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

Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053 #274

Closed
ccorcos opened this issue Sep 14, 2018 · 15 comments
Closed

Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053 #274

ccorcos opened this issue Sep 14, 2018 · 15 comments

Comments

@ccorcos
Copy link

ccorcos commented Sep 14, 2018

When trying to open the dev tools tools, I get this error and it immediately closes:

❯❯❯ ios_webkit_debug_proxy
Listing devices on :9221
Connected :9222 to 🍉 (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
Invalid packet header 0x1ffffff91ffffffa0ffffff9d == .... == 26321053
Disconnected :9222 from 🍉 (6a028994cf281be807bf80c5557c3f2eb3fbb8b0)
@artygus
Copy link
Collaborator

artygus commented Sep 15, 2018

hi @ccorcos the error occurs because message from webinspector is larger than 16mb, which is a bot suspicious. are you debugging any particular page or is it an app?

could you please attach output of ios_webkit_debug_proxy -d?

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

Interesting. Well, I have an application with 39MB unminified javascript file (with source maps, etc)... Any way to override this restriction?

https://gist.github.com/ccorcos/aab47a99b29b9dd2d8e415be191ed487

@artygus
Copy link
Collaborator

artygus commented Sep 18, 2018

@ccorcos pushed changes, can you confirm has been fixed for you?

brew reinstall -s ios-webkit-debug-proxy

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

I had to run brew install --HEAD ios-webkit-debug-proxy to install ios-webkit-debug-proxy HEAD-a724e10.

Still disconnected though: https://gist.github.com/ccorcos/096940a1e342cc4468b31801b2ef37eb

@artygus
Copy link
Collaborator

artygus commented Sep 18, 2018

Well, I see no Invalid packet header in output log. Not sure what could go wrong this time, let me craft a sample with heavy js and I'll get back to you

@artygus artygus reopened this Sep 18, 2018
@artygus
Copy link
Collaborator

artygus commented Sep 18, 2018

can't reproduce the disconnection thing, would be great if you could provide reproduce steps

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

Hmm. When I open the production version of the app <www.notion.so> in iOS Safari, I don't get the disconnect error. However, it doesn't seem fully functional. The console doesn't work and click to select element thing doesn't work either. Is that expected?

As for a reproduction, I'll have to try to set some things up. I'm async loading some more large JS files right after startup, so that could be it.

@artygus
Copy link
Collaborator

artygus commented Sep 18, 2018

safari/chrome dev tools protocols diverged a lot, please see https://github.com/google/ios-webkit-debug-proxy#using-with-devtools for workarounds

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

I see. Well let me see what I can recreate for you. Thanks for the help.

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

Just a thought, could the issue be large source maps? I'd imagine those are expensive to load, especially in a 39MB JS file.

@artygus
Copy link
Collaborator

artygus commented Sep 18, 2018

Can't be 100% sure, but technically they're just another asset file. Crafted 28MB javascript with source maps, still no luck. The only achievement hanging dev tools page so far 🙂

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

Hmm. Turning sourcemaps off seems to have fixed the problem. Let me see if I can minimally reproduce.

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

More progress: 82MB generate js file with sourcemaps worked.

@ccorcos
Copy link
Author

ccorcos commented Sep 18, 2018

Alright, I have a repro! I generated a bunch of async typescript code (which would generate a bunch of sourcemaps). I also have a few async imports. Everything built with webpack.

reproduction.zip

@artygus
Copy link
Collaborator

artygus commented Sep 20, 2018

it worked thanks! interesting thing is that Safari Dev Tools on OSX also gets disconnected immediately after opening, I bet that usbmuxd service fails to handle connection for some reason. I'm going to open new issue as the issue with inavalid packet header should've been fixed after increasing max websocket body limit

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

No branches or pull requests

2 participants