R-Sandor / FindFirst

Organizing the information that matters to you and your teams. The knowledge of your world.
https://findfirst.dev
Apache License 2.0
10 stars 17 forks source link

[Server] Url encode on import #266

Closed R-Sandor closed 2 weeks ago

R-Sandor commented 4 weeks ago

Details

There is a bug that might be caused on the import modal caused by the url being decoded: https://github.com/R-Sandor/FindFirst/blob/main/server/src/main/java/dev/findfirst/core/service/BookmarkService.java#L207 Intern the error might cause the import to partially fail.

Tasks

smzoha commented 4 weeks ago

Hi @R-Sandor, I would like to take a look at this.

Can you please outline what sort of behavior the bug is producing in the application?

Do you have any specific flow that I can follow to reproduce this error at all times (or any URL affected by this issue)?

R-Sandor commented 4 weeks ago

@smzoha absolutely! Appreciate the help too!

The problem I am seeing is in the import of a bookmarks file. In dev it always works but in production the import sort of just works in the background and the GUI should be receiving the data back but it gets an error about an unexpected character, I think this is the result url encoding error.

R-Sandor commented 4 weeks ago

@smzoha I have sample import data in /data/bookmarks. Feel free to try exporting some of your own bookmarks from Chrome/FireFox/Brave/etc too.

smzoha commented 4 weeks ago

@R-Sandor I'll see what I can find.

R-Sandor commented 4 weeks ago

@smzoha Thanks! I will try to capture some screenshots for you too.

smzoha commented 4 weeks ago

@R-Sandor I tried a few different types of URLs, tried some of the sample bookmarks provided in the project as well, but alas, couldn't find any exception crop up in my test cases.

I tried importing a non-encoded URL and JSoup seemingly did the encoding here, so I feel that might not be the issue here. If you manage to gather some more information around this, I'd be happy to take another look.

R-Sandor commented 3 weeks ago

@smzoha I took a look at it yesterday, it looks like its not a URL issues. It seems like there is a problem with how Flux is behaving when its deployed on the server.

It appears to return all the bookmarks at once rather than one at a time in the usual behavior for Flux and in the dev environment (i.e. one's own machine).

R-Sandor commented 3 weeks ago

@smzoha I am going to leave this issue open but unassigned because now its not breaking anything with the frontend handling all the bookmarks at once if Flux is broken. I am just not sure why Flux would behave differently.

smzoha commented 3 weeks ago

@R-Sandor, that is alright. I haven't been able to look into this recently. If anyone can figure out the reason behind it, that'd be awesome (and would be enlightening).