RemoteDebug/remotedebug-ios-webkit-adapter

"document.registerElement is not function" causing blank screen

ryanflores-bayalarm opened this issue · 10 comments

The adapter stopped working for me yesterday while using Chrome on Macos 10.15.3. When I tap the Inspect link, a blank window launches. When I open a separate console window for the Inspect window, I'm Seeing the following error:

Uncaught TypeError: document.registerElement is not a function
    at Object.UI.registerCustomElement (inspector.js:2927)
    at inspector.js:2938
    at inspector.js:2940

Based on what I've found while searching online, it appears that registerElement() was deprecated.

I also can't seem to get the adapter to work while using Brave, which displays a completely different error:

Uncaught TypeError: this._pendingExtensionDescriptors.pushAll is not a function
    at DevToolsAPIImpl.addExtensions (devtools_compatibility.js:89)
    at <anonymous>:1:13

Chrome Version: 80.0.3987.106
Brave Version: 1.3.115

Seeing the same error. document.registerElement is no longer defined in Chrome.

Also tried remotedebug-ios-webkit-adapter@next, with no luck.

As a workaround, I downloaded an older version of Chromium, and it worked there:

https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/668249/

mtjn commented

Also having this issue on Ubuntu 19.10
Chromium: Version 80.0.3987.122 (Official Build) snap (64-bit)

See pull #186 changing the dev tools front end url in adapter.js (compiled version) from using hash 7d149ef5473e980f0b3babd4d0f2839cb9338e73 to fcea73228632975e052eb90fcf6cd1752d3b42b4 solved this problem for me. For me on Windows 10 this file is located at %appdata%\npm\node_modules\remotedebug-ios-webkit-adapter\out\adapters\adapter.js and the line number is 122.

@UndefinedOffset Thanks, but that does not work either. Now I got the controls (forward, backward, reload) on the upper side which weren't there before but unfortunately the screen stays blank.

After some debugging it seems that it somehow fails to get the correct device version (function getDeviceVersion) so it fallbacks always to 9.3.0 which is hardcoded (function getTargets) in the file "iosAdapter.js". After adjusting that fallback value to the correct version it works.

Chrome: 80.0.3987.132
OS: Windows 10
iOS 12.4.5

That could be related to the error I see in my console, which seems to be discussed in #79.

error.iosAdapter.getTargets.getDeviceVersion.failed.fallback, device=[object Object]

For me the issue appears to be that vs-libimobile' ideviceinfo.exe fails to start. However for me iOS 12.4.5 doesn't connect properly there's no html in the elements tab and the console doesn't work. It did work with an iOS 10 device so I wonder if the communication in this is just simply not working properly.

I see only errors like this in the console:

UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict

But for now it works. I've wasted to much time to get it runnable.

See pull #186 changing the dev tools front end url in adapter.js (compiled version) from using hash 7d149ef5473e980f0b3babd4d0f2839cb9338e73 to fcea73228632975e052eb90fcf6cd1752d3b42b4 solved this problem for me. For me on Windows 10 this file is located at %appdata%\npm\node_modules\remotedebug-ios-webkit-adapter\out\adapters\adapter.js and the line number is 122.

This change does make the tabs show up, but everything is still blank for me

For me the only way I could get iOS 12.4 devices to work was to install this using remotedebug-ios-webkit-adapter@next but for iOS 13 I think there are other problems based on some other posted issues.

New release have been published with #186. This should resolve the issue.