Skip to content

fix(firefox): remove setTimeout from onLocationChange#511

Merged
gioboa merged 2 commits intoQwikDev:mainfrom
emish89:fix(firefox)-removed-settimeout-to-fix-error-on-firefox
Dec 29, 2023
Merged

fix(firefox): remove setTimeout from onLocationChange#511
gioboa merged 2 commits intoQwikDev:mainfrom
emish89:fix(firefox)-removed-settimeout-to-fix-error-on-firefox

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

@vercel
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
Collaborator

@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
Collaborator

@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
@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