-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BLOCKER] wp-desktop: Runtime Error: Unable to connect to WordPress.com #42898
Comments
I've been debugging this for a better part of today 🙂 It seems to be some webpack weirdness. The |
Thank you, @jsnajdr! 🙏 Let me know if you need a hand at any point! |
So far it seems like a subtle webpack bug. |
What I know about the issue so far: The trouble is with dynamically loading the Usually, webpack would recognize a situation where a dynamic import imports something that's already statically bundled. In that case, the dynamic But in this case, where there are multiple entrypoints, where the module is statically available only in some of them, webpack gets confused. It's confused in a case where the webpack runtime is instantiated for each entrypoint separately. Either inline in the entrypoint chunk, or as a separate chunk in the entrypoint's chunk group. Then webpack fails to include information about that module (the flag that it's already "installed", the mapping from chunk ID to file name, ...) in that custom runtime. Executing the dynamic Only if there is a single runtime common for all entrypoints, the bug disappears. The So far, I've been unable to isolate the issue and create a minimalistic example. |
Thanks for the deep dive into this, @jsnajdr!
After the code splitting feature flag was merged into Calypso, it seems the Desktop is still building things into one giant file. You can confirm this by looking at @sgomes Seems we're currently at a standstill to get this resolved, unfortunately. Is it possible to revert the changes in #42785 while we look into this issue further? |
Unfortunately, it seems that would break things in Jetpack Cloud 😞 See #42763 (comment) |
😞 Is there another course of action we can take? The last known good SHA of Calypso is from May 29th, and there have been some important features merged since then (e.g. #42752), which we won't be able to deploy with the Desktop app. My biggest concern is the longer this goes unresolved, the higher risk of more breaking changes introduced as time goes on while CI is effectively offline. Any thoughts, @griffbrad? |
|
Identified and reported a webpack issue: webpack/webpack#11005 We'll need to get rid of the |
Amazing work tracking down that webpack issue, @jsnajdr! And glad to hear that there's a way we can unblock wp-desktop and Jetpack Cloud while that's sorted out upstream. |
Bump: can we close this issue out? |
Yes, this should now be sorted out. Closing. |
Description
A runtime error has been introduced to the desktop app, which manifests with the error message in the UI:
Unable to connect to WordPress.com
Devtools console shows the error:
For some reason I was getting inconsistent results when trying to reproduce locally (probably some cached state), so I threw up a test branch which I ran against several Calypso commits.
Test branch CI runs
The error seems to have been introduced with d46489e, which was part of PR #42785 (I can't quite see how the code change would result in the error, though).
Tested the commit immediately before (6891b77) and it completed successfully, which seems to indicate that this code change might be driving the error.
wpcom-xhr-wrapper
#42785 didn't complete (Mac/e2e test job was marked "canceled"). I have noticed several of these and could be a bug in the canary bridge code that triggers desktop CI.PR #42785 Desktop CI
The text was updated successfully, but these errors were encountered: