Skip to content

Conversation

@crbelaus
Copy link
Contributor

@crbelaus crbelaus commented Sep 14, 2025

The ErrorTracker assets were compiled against an old (pre 1.0) version of LiveView. This causes issues in applications using LiveView 1.0 and newer.

@crbelaus crbelaus self-assigned this Sep 14, 2025
@crbelaus crbelaus force-pushed the update-phoenix-liveview branch 2 times, most recently from 61e281e to 7839b10 Compare September 14, 2025 10:11
@crbelaus crbelaus force-pushed the update-phoenix-liveview branch from 7839b10 to 30554c6 Compare September 14, 2025 10:12
@crbelaus
Copy link
Contributor Author

@jaimeiniesta can you try if it fixes #158 for you?

@andreh11
Copy link

I have the same error in production and I can confirm that this PR fixes #158.

Also, I’d like to thank you for this wonderful project. If you need help, I’d be happy to contribute.

@jaimeiniesta
Copy link

@crbelaus sorry, I missed this notification.

I've tried this branch, and it does fix the issue for me. But now I see this error in the Firefox console:

LiveView asset version mismatch. JavaScript version 1.1.11 vs. server 1.1.13.
To avoid issues, please ensure that your assets use the same version as the server.
[error_tracker:1547:3872](http://localhost:4000/admin/error_tracker?)

@andreh11
Copy link

andreh11 commented Oct 6, 2025

@jaimeiniesta Yes, I also see this error. @crbelaus, would you like some help to investigate this issue?

@crbelaus
Copy link
Contributor Author

crbelaus commented Oct 8, 2025

This is an interesting error. It seems to happen because the LiveView version used by the ErrorTracker does not match the one configured in the project that includes it.

I have to investigate it a bit deeper. There must be a way to ensure that LiveView does not complaint about different, but compatible versions.

@franc
Copy link

franc commented Oct 13, 2025

same same, but phoenix_live_view is now at 1.1.14

@crbelaus
Copy link
Contributor Author

crbelaus commented Oct 13, 2025

We may need to use the same approach as Oban Web did here. Basically we shouldn't bundle Phoenix and LiveView assets and, instead, we should read them at compile time and concatenate with our own app.js.

This would ensure that there is no version mismatch between the application's LiveView and the one bundled by the error tracker.

I'll try to work on this over the weekend.

EDIT: the Oban Web changes were in turn adapted from phoenixframework/phoenix_live_dashboard#386

@crbelaus crbelaus marked this pull request as ready for review October 19, 2025 13:47
@crbelaus
Copy link
Contributor Author

crbelaus commented Oct 19, 2025

The last commit should get rid of the warning about LiveView and ErrorTracker version mismatch. We now follow LiveDashboard and Oban Web footsteps and import the LiveView assets directly.

There is a potential separate improvement to ensure that the resulting assets can be cached properly. This was done in phoenixframework/phoenix_live_dashboard#406 and in oban-bg/oban_web@2b8f66b

Since this only affects the ErrorTracker dashboard I'll address it in a separate pull request to ensure that we don't delay support for Phoenix LiveView +1.0 any more.

Edit: @andreh11, @jaimeiniesta, @franc can you confirm that this fixes the warning for you as well?

@franc
Copy link

franc commented Oct 20, 2025

@crbelaus I can confirm that this removes the js version mismatch warning.
! thanks

@jaimeiniesta
Copy link

@crbelaus me too, there are no JS warnings now!

@codeadict
Copy link

I can confirm this works great now on liveview 1.1.2

@andreh11
Copy link

@crbelaus Thanks, working great now!

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.

6 participants