Sometimes you encounter a problem that you don't seem to have a solution. Searching for an answer doesn't bring any help either. You just need to figure it out somehow.
It often helps to step back and take some distance to the problem. Keeping hitting your head against the wall doesn't help. It's hard to come up with new possible solutions when your mind is fixed trying to solve the issue in certain way. Giving it some time. This can give some new perspective and getting back to the problem with new angle can help solve it. Try again the next day.
Even if you stop thinking about the problem for a while it doesn't truly go put of your mind. Yes, it can bother you, but tour mind can also work on it in the background without you even noticing. Then, when you get back to the task it can seem like it almost magically solved itself.