Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(firefox): remove setTimeout from onLocationChange #511

Conversation

emish89
Copy link
Contributor

@emish89 emish89 commented Dec 12, 2023

What is it?

  • Bug

Description

I removed a setTimeout that was giving error on firefox after page change. There are more open issues for this.

Use cases and why

I expect that now firefox works

Copy link

vercel bot commented Dec 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
partytown ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2023 4:36pm

Copy link
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable, I will try to dig into why setTimeout is there. In the meantime could we have a test https://github.com/BuilderIO/partytown/tree/main/tests/platform which shows that the issue has been fixed?

@emish89
Copy link
Contributor Author

emish89 commented Dec 13, 2023

This looks reasonable, I will try to dig into why setTimeout is there. In the meantime could we have a test https://github.com/BuilderIO/partytown/tree/main/tests/platform which shows that the issue has been fixed?

can you help me create a proper test?

I tried adding "firefox" to playwright but almost all the tests are failing. So I'm not sure on how to proceed and I prefer waiting for some help.

The issue happens only in firefox, at first page change.

The open bugs are at least these:
#505
#486
#457
withastro/astro#8862

@gioboa
Copy link
Member

gioboa commented Dec 18, 2023

HI @emish89
I added the firefox scripts and your change it's working fine.

@emish89
Copy link
Contributor Author

emish89 commented Dec 18, 2023

great, so you think can be merged?

@gioboa
Copy link
Member

gioboa commented Dec 18, 2023

there is not tests for onLocationChange method.
Can you add them pls?

@gioboa
Copy link
Member

gioboa commented Dec 19, 2023

I investigated and "astro": "^4.0.6" solves this issue without change anything in PartyTown.
Can you check @emish89 pls?

@emish89
Copy link
Contributor Author

emish89 commented Dec 19, 2023

I investigated and "astro": "^4.0.6" solves this issue without change anything in PartyTown. Can you check @emish89 pls?

@gioboa I was involved in the astro fix. If you see the code: https://github.com/withastro/astro/pull/9419/files

you can see that the history APIs has been replaced. With these changes, from your point of view, partytown library is still working as expected?

It was intended as a temporary fix until partytown solves the problems with firefox from what I've understood.

Copy link
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but there is a failure.

@gioboa
Copy link
Member

gioboa commented Dec 29, 2023

@emish89 the failing test is a flaky one. Now we have a green line.

@gioboa gioboa changed the title fix(firefox): removed settimeout to fix error on firefox fix(firefox): remove setTimeout from onLocationChange Dec 29, 2023
@gioboa gioboa merged commit eac85b8 into QwikDev:main Dec 29, 2023
8 checks passed
@gioboa gioboa linked an issue Dec 29, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐞] firefox issues
3 participants