New issue
Advanced search Search tips

Issue 747961 link

Starred by 4 users

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 1
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

java script crashes with syntax errors but the script files are ok

Reported by gpeterba...@gmail.com, Jul 24 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36

Steps to reproduce the problem:
1. start local jetty server
2. start a large java script program with Sencha ExtJS
3. keep hitting refresh to reload the java script program, after a while only failures come and the app does not start.

Multiple.js:7 Uncaught SyntaxError: Unexpected end of input
UploadDialogView.js:77 Uncaught SyntaxError: Unexpected end of input
ViewConfiguration.js:92 Uncaught SyntaxError: Unexpected end of input
JabWindow.js:5 Uncaught SyntaxError: Invalid or unexpected token

What is the expected behavior?
The script files are ok, and normally work fine.  The error is sporatical.

What went wrong?
No errors come when connecting to a remote server, either jetty or jboss.
No errors come using a local server with an older chrome browser 55.0.2883.75 installed with yast.

Did this work before? Yes 55.0.2883.75

Chrome version: 59.0.3071.86  Channel: n/a
OS Version: Open Suse 13.2
Flash Version:
 
Components: -Blink Blink>JavaScript>Parser
Can you attach network logs of the failing case? https://dev.chromium.org/for-testers/providing-network-details

This sounds like  Issue 724166 , but that bug didn't ship beyond a few Canaries.
Components: -Blink>JavaScript>Parser Blink
That sounds not like the problem is with the JavaScript VM but with the data received or the server. Can you please provide a sample application, "start a large java script program with Sencha ExtJS" is a little bit unspecific :-).


When I turn on network logging the problem does not occur.
With logging on I did 20 refresh, no problem.
after turning it off, after several refresh the tab crashes and hangs.
The problem seems to have to do with very fast client-server communication.
The same develoment scenario on windows works well, connecting to another server
or starting the browser on a different machine works well.  The only thing that I see here is that linux is far faster than windows.  The server response on my machine is a lot faster than the same machine running windows.  Anything which slows down the client-server communication elliminates the problem.


I tried to reproduce the problem with a test program, but i was not successful.  The problem is very difficult to reproduce.  For now, the older browser is working for me.

For the failing JavaScript files, are they encoded in UTF-8 with the byte sequence 0xEF,0xBB,0xBF as the first three bytes of the file?
Labels: TE-NeedsTriageHelp
All files are UTF-8 and contain special characters which work fine.
The 4 errors i listed are only the first of 100 errors.
I now start the newest chrome browser with "--log-net-log=/dev/null",
and there are no more problems.
it runs very stable.


The files do not start with an UTF-8 BOM.

Comment 9 by rbyers@chromium.org, Jul 27 2017

Cc: elawrence@chromium.org
Components: -Blink Internals>Network
Cc: eroman@chromium.org
Components: -Internals>Network Internals>Network>Logging
This is a strange heisenbug, and I'm not sure if there are any steps we can take to resolve it, given that attempting to reproduce the issue cannot be measured.

As Comment #2 mentions, without a reproduction, we won't be able to take any further action. So I'm tempted to WontFix, but adding some extra eyes just in case.
Components: -Internals>Network>Logging
The error:
    UploadDialogView.js:77 Uncaught SyntaxError: Unexpected end of input

Likely means that UploadDialogView.js got truncated (or possibly also garbled, but I would suspect truncation first).

Given that this reproduces when hitting refresh a bunch of times, and given that it doesn't seem to reproduce with the slightly different timings when writing to a net-log file, my first guess would be to blame your local server.

I don't know about "jetty server", but certainly we have seen a lot of bugs with user's dev servers, so I would start the investigation there.

* In your dev tools try to look at the resource that is throwing the error - was it truncated?
* Is the server using keep alive connections?
* Do you have server logs indicating any errors with it closing connections?

Comment 12 by marja@chromium.org, Jul 31 2017

First I thought that this might be related to V8 script streaming (especially streaming  UTF-8 files), and the error occurs only when the files are streamed, and when the file is split into chunks a certain way. That could explain the sporadic failures.

However, when hitting refresh, the files should come from the cache and not be streamed. If hitting refresh makes this repro, it's less likely that streaming is the culprit.

Comment 13 by marja@chromium.org, Jul 31 2017

Ah, btw, to be sure, can you try running Chrome with:

--js-flags=--no-script-streaming

and see if it reproes?
starting chrome with
/usr/bin/google-chrome --js-flags=--no-script-streaming
does not solve the problem.
after several refreshes, the syntax errors come and the tab hangs, 
i must kill it with the task managaer.
I always run chrome with the developer console and "disable cache" checked on the network page.
After the error occurs i can browse the java script file tree in "Sources", and everything seems to be there, but it will not open any java script files.
Together with sencha there are 1,500 java script files.
I have worked for days now with the flag --log-net-log=/dev/null,
and the error did not occur.


Project Member

Comment 15 by sheriffbot@chromium.org, Aug 1

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment