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

Source maps not loading with Electron 7.x #442

Closed
bendemboski opened this issue Jan 8, 2020 · 1 comment · Fixed by #476
Closed

Source maps not loading with Electron 7.x #442

bendemboski opened this issue Jan 8, 2020 · 1 comment · Fixed by #476

Comments

@bendemboski
Copy link
Member

bendemboski commented Jan 8, 2020

When running ember electron with Electron 7.x, if you open the dev tools, the source maps do not load.

The root cause is changes in Chromium around the network service. Things broke in Electron 7.0.0, and this fix (a backport of this chromium fix) got source maps working again for file: URLs. But they still don't work for custom protocols, like our serve: protocol that we use with electron-protocol-serve.

Here is the Electron issue I filed tracking this, but I have no idea if it will get attention/a fix anytime soon. Possible alternatives:

  1. Look into a way of instrumenting the build or runtime protocol handling to rewrite the sourceMappingURL directive at the end of js files to use absolute file: URLs to point to the source maps (instead of relative URLs that end up resolving to custom protocol serve: URLs)
  2. Toss the whole custom procotol/electron-protocol-serve thing, and go back to using file: URLs (which probably requires using the hash location type in Ember)
@jacobq
Copy link
Collaborator

jacobq commented Jan 8, 2020

I was wondering what happened (thought maybe it was a problem on my side)

bendemboski added a commit that referenced this issue May 18, 2020
`electron-protocol-serve` seems to have taken us too far off the beaten path, so this changes `ember-electron` to set up projects to load from file: URLs instead of the custom protocol. This requires a couple of workarounds to make Ember apps work properly when loaded from file: URLs -- all explained in detail in the new FAQ page. This gets us sourcemaps back in Electron 7+, and also removes the need for a variety of minor workarounds for security/sandboxing issues caused by our use of a custom protocol.

Fixes #442
bendemboski added a commit that referenced this issue May 18, 2020
`electron-protocol-serve` seems to have taken us too far off the beaten path, so this changes `ember-electron` to set up projects to load from file: URLs instead of the custom protocol. This requires a couple of workarounds to make Ember apps work properly when loaded from file: URLs -- all explained in detail in the new FAQ page. This gets us sourcemaps back in Electron 7+, and also removes the need for a variety of minor workarounds for security/sandboxing issues caused by our use of a custom protocol.

Fixes #442
bendemboski added a commit that referenced this issue May 18, 2020
`electron-protocol-serve` seems to have taken us too far off the beaten path, so this changes `ember-electron` to set up projects to load from file: URLs instead of the custom protocol. This requires a couple of workarounds to make Ember apps work properly when loaded from file: URLs -- all explained in detail in the new FAQ page. This gets us sourcemaps back in Electron 7+, and also removes the need for a variety of minor workarounds for security/sandboxing issues caused by our use of a custom protocol.

Fixes #442
bendemboski added a commit that referenced this issue May 21, 2020
`electron-protocol-serve` seems to have taken us too far off the beaten path, so this changes `ember-electron` to set up projects to load from file: URLs instead of the custom protocol. This requires a couple of workarounds to make Ember apps work properly when loaded from file: URLs -- all explained in detail in the new FAQ page. This gets us sourcemaps back in Electron 7+, and also removes the need for a variety of minor workarounds for security/sandboxing issues caused by our use of a custom protocol.

Fixes #442
bendemboski added a commit that referenced this issue May 21, 2020
`electron-protocol-serve` seems to have taken us too far off the beaten path, so this changes `ember-electron` to set up projects to load from file: URLs instead of the custom protocol. This requires a couple of workarounds to make Ember apps work properly when loaded from file: URLs -- all explained in detail in the new FAQ page. This gets us sourcemaps back in Electron 7+, and also removes the need for a variety of minor workarounds for security/sandboxing issues caused by our use of a custom protocol.

Fixes #442
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 a pull request may close this issue.

2 participants