Skip to content

[Phpstorm Plugin Support] Remote Call (Additional bugreport) #24355

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

Closed
pquerner opened this issue Sep 28, 2017 · 6 comments
Closed

[Phpstorm Plugin Support] Remote Call (Additional bugreport) #24355

pquerner opened this issue Sep 28, 2017 · 6 comments

Comments

@pquerner
Copy link

Q A
Bug report? yes
Feature request? yes
Symfony version 3.4-dev (bd3bc69)

Ticket #24218 was fixed via #24236 , but it introduced an error on Windows machines.

The following error is logged to the users Browser

Uncaught SyntaxError: Invalid Unicode escape sequence

The generated link from the profiler looks like this on a Windows 10 machine:

javascript:var rq = new XMLHttpRequest(); rq.open('GET', 'http://localhost:8091?message=G:\_projects\xxxx\app\Resources\views\user\edit.html.twig:1', true); rq.send(null);

(My browser is Google Chrome Version 61.0.3163.100)

If the URL is opened by hand it correctly opens the file in my PHPStorm IDE (with enabled Remote Call Plugin).

If we manually escape the Windows directory dividers (backslash) with additional backslashes, the URL should look like this:

javascript:var rq = new XMLHttpRequest(); rq.open('GET', 'http://localhost:8091?message=G:\\_projects\\xxxx\\app\\Resources\\views\\user\\edit.html.twig:1', true); rq.send(null);

and is working fine.

This has been reported before here #24236 (comment) but I was asked to create a new issue here #24218 (comment)

I guessed here #24236 (comment) that the generated link variable should again be looked at from a Windows machine. Although its currently unclear where the XHR link is coming from (like guessed here #24236 (comment))

@ro0NL
Copy link
Contributor

ro0NL commented Sep 28, 2017

Can you explain/debug where this JS comes from, im kinda clueless. And seems not really SF related, but maybe the plugin/browser is messing here. (we might do something to overcome).

@ro0NL
Copy link
Contributor

ro0NL commented Sep 28, 2017

If this truly requires to be called as XHR request, maybe a new setting could work;

framework.ide: { link: '...', xhr: true }

@nicolas-grekas
Copy link
Member

for sure not, config options shouldn't be used as workarounds for badly encoded strings :)

@pquerner
Copy link
Author

If I dump the variable link here 9ebe218#diff-d586a5424c06b09812bbfd9e8c266456R90

I get the javascript:var rq = new XMLHttpRequest(); rq.open('GET', 'http://localhost.... string. So I guess its SF related? But if I search my whole app folder (with vendors folder) for this code it doesnt show up.

@stof
Copy link
Member

stof commented Sep 28, 2017

@pquerner search for the beginning of the string (without the URL itself, as it depends on the path being opened), it may allow you to find the location.

@pquerner
Copy link
Author

Turns out #24356 (comment) nothing needs to be changed after all. Sorry for the big mess, guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants