Greetings and welcome to the ranch....
That said, i have a few issues for you to work.
Starting Pedantic mode ---
First you have not implemented the 8 queens problem, but the n queens problem.
That said, if you have researched the problem, then you know you have not sent enough information for us to answer your question - now if you have not researched your problem, then how do you know what all of the solutions are? i.e.: are you supposed to get 92 or 12 solutions? we don't know, so how can we help?
All of that said - since you are solving the n queen problem and
you should know by now that 1 queen is a trivial problem (does your code handle this?). and we know that n = 2 and n = 3 have no solutions. So what i would do, if i were you, is to, by hand write down how YOU would solve a 4 queen problem, detailing every change to your stack (or any other data structure) and what you expect for your output.
Then and only then would i run the code, but i would add prints anytime the data structure changes.
Also, there is too much code in your solve method to
test easily - break it down and test it before adding to an entire program.
HTH
-steve