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

Hammerhead crashes if a script file contains a sourcemap comment #1052

Closed
LavrovArtem opened this issue Feb 22, 2017 · 9 comments
Closed

Hammerhead crashes if a script file contains a sourcemap comment #1052

LavrovArtem opened this issue Feb 22, 2017 · 9 comments
Labels
STATE: Auto-locked Issues that were automatically locked by the Lock bot SYSTEM: resource processing TYPE: bug
Milestone

Comments

@LavrovArtem
Copy link
Contributor

Maybe we need to remove the source map comment from the script.

@churkin churkin added this to the Sprint #6 milestone Mar 24, 2017
@churkin churkin modified the milestones: Sprint #7, Sprint #6 Apr 24, 2017
@miherlosev miherlosev modified the milestones: Planned, Sprint #7 May 16, 2017
@miherlosev
Copy link
Contributor

miherlosev commented May 24, 2017

Steps to reproduce:
1)Open https://microsoft.github.io/monaco-editor/playground.html in a playground
2)Open ChromeDeveloperTools

Then you are getting the following errors in a console:

(node:10280) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Protocol "http:" not supported. Expected "https:"
(node:10280) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Protocol "http:" not supported. Expected "https:"
(node:10280) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: Protocol "http:" not supported. Expected "https:"
(node:10280) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: Protocol "http:" not supported. Expected "https:"

It happens because:

//# sourceMappingURL=loader.js.map
  • on open DeveloperTools browser send request for sourceMap to a proxy. It sends as script.
    /Bkh0nzQWb!s!utf-8/http:/localhost:8080/node_modules/monaco-editor/min-maps/vs/loader.js.map
    -after it proxy failed

We will remove sourceMap definitions from script files.

@miherlosev
Copy link
Contributor

I'm working on this

@miherlosev miherlosev modified the milestones: Sprint #7, Planned May 24, 2017
@miherlosev
Copy link
Contributor

miherlosev commented May 24, 2017

@miherlosev miherlosev changed the title Investigate the source map problem Hammerhead crashed if script file contains sourcemap comment May 25, 2017
@miherlosev miherlosev changed the title Hammerhead crashed if script file contains sourcemap comment Hammerhead crashed if script file contains a sourcemap comment May 25, 2017
@miherlosev miherlosev changed the title Hammerhead crashed if script file contains a sourcemap comment Hammerhead crashes if script file contains a sourcemap comment May 25, 2017
miherlosev pushed a commit to miherlosev/testcafe-hammerhead that referenced this issue May 25, 2017
@AlexanderMoskovkin AlexanderMoskovkin changed the title Hammerhead crashes if script file contains a sourcemap comment Hammerhead crashes if a script file contains a sourcemap comment Jun 2, 2017
@doronsever
Copy link

Any news about this one? I'm trying to test it with my Angular TS localhost and getting errors because of it

@miherlosev
Copy link
Contributor

Could you please provide a simple example to reproduce?

@doronsever
Copy link

Now after I rerun I'm not sure it is related, but when i'm running my Angular(6) app via localhost I'm getting this error: Error [ERR_INVALID_PROTOCOL]: Protocol "http:" not supported. Expected "https:"

@doronsever
Copy link

Should I open a new issue for it?

@miherlosev
Copy link
Contributor

Yes, it's a separate issue. Please open a new issue and share a simple example to reproduce.

AndreyBelym pushed a commit to AndreyBelym/testcafe-hammerhead that referenced this issue Feb 28, 2019
…lose DevExpress#1052) (DevExpress#1147)

* fix 'Hammerhead crashes if script file contains a sourcemap comment' (close DevExpress#1052)

* rename function

* rename test name

* fix typo
@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked Issues that were automatically locked by the Lock bot label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked Issues that were automatically locked by the Lock bot SYSTEM: resource processing TYPE: bug
Projects
None yet
Development

No branches or pull requests

4 participants