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

RPI: Remote web Inspector not working #549

Closed
deeps8us opened this issue Oct 24, 2018 · 12 comments
Closed

RPI: Remote web Inspector not working #549

deeps8us opened this issue Oct 24, 2018 · 12 comments

Comments

@deeps8us
Copy link

Trying to use remote web inspector in rpi. But getting error.

westeros --renderer libwesteros_render_gl.so.0.0.0 --framerate 60 --display main0 &
export WEBKIT_INSPECTOR_SERVER=${WEBKIT_INSPECTOR_SERVER:-':::9224'}
/usr/bin/WPELauncher http:///wizardkit/ui/guide.html &

From browser: launch
http://<board_ip>:9224/

Getting the error:

Inspectable web views

None found, make sure that you have set the developerExtrasEnabled preference property on your WebView.

@aperezdc
Copy link

@deeps8us The WEBKIT_INSPECTOR_SERVER should have an valid address to bind to. Can you try setting it to WEBKIT_INSPECTOR_SERVER=0.0.0.0:9224? Also, if you are using a modern enought branch, you will need to access inspector://<board-ip>:9224 from the browser instead of http://<board-ip>:9224. Also, you will need a WebKit-based browser like GNOME Web or Midori.

@deeps8us
Copy link
Author

Same issue after setting WEBKIT_INSPECTOR_SERVER=0.0.0.0:9224 and also with Midori

@aperezdc
Copy link

aperezdc commented Oct 30, 2018

@deeps8us Which version of WPE WebKit are you using? It looks like you are using WpeLauncher. Is that so? Re-reading its code I see that it does not enable the developer extras, which is needed for the remote inspector to work — there is no call to WKPreferencesSetDeveloperExtrasEnabled(), you may need patch it with a change like the one suggested in WebPlatformForEmbedded/WPEWebKitLauncher#5

aperezdc added a commit to aperezdc/WPEWebKitLauncher that referenced this issue Oct 30, 2018
It does make sense to enable the developer extras when the
WEBKIT_INSPECTOR_SERVER environment variable has been set.

Related issue: WebPlatformForEmbedded/WPEWebKit#549
@albertd
Copy link

albertd commented Nov 21, 2018

@deeps8us this enabled by default when using the wpeframework based startup, default set on port 9888

@albertd albertd closed this as completed Nov 21, 2018
@Trinath402
Copy link

Trinath402 commented Nov 22, 2018

hi @aperezdc we enabled "WKPreferencesSetDeveloperExtrasEnabled" in our launcher code, but it didn't worked for us. We are still facing same error "None found, make sure that you have set the developerExtrasEnabled preference property on your WebView" on browser.

hi @albertd we tried on 9888 port as well but still observes the same behaviour.

Is this WKPreferencesSetDeveloperExtrasEnabled needs to be enable from browser end?? (or) can we enable on platform directly.

@albertd
Copy link

albertd commented Nov 22, 2018

@Trinath402 which build config are you using and are you using safari / chrome?

@hlev
Copy link

hlev commented Nov 22, 2018

I'm running WPELauncher with the newer WPEWebkit (wpe-20170728), specifically: 371d4b0 and c04a067 and I don't have an inspector either.

WPELauncher binds just fine to 9998, as export WEBKIT_INSPECTOR_SERVER=0.0.0.0:9998 is set by the default /usr/bin/wpe script, but both over http:// (Chromium/Midori) and inspector:// (Midori) there's only an empty response I don't even see that error OP mentioned.

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:9998            0.0.0.0:*               LISTEN      20424/WPELauncher

I have a warning when WPELauncher starts, but otherwise works fine, not sure if it's related.

** (process:19966): WARNING **: Error loading the injected bundle (/usr/lib/libWPEInjectedBundle.so): /usr/lib/libWPEInjectedBundle.so: undefined symbol: _ZN6WebKit22WebKitExtensionManager10initializeEPNS_14InjectedBundleEPN3API6ObjectE
[WPELauncher] Hello InjectedBundle ...

If I follow this thread correctly, I'll need the patch from @aperezdc and that should be it, or is there anything else I need to be aware of when "downgrading" to WPELauncher?

@albertd
Copy link

albertd commented Nov 22, 2018

@hlev
Copy link

hlev commented Nov 22, 2018

Thanks, that works indeed.

@Trinath402
Copy link

Trinath402 commented Nov 22, 2018

Hi @albertd,

         I tried with enabling  WEBKIT_INSPECTOR_SERVER and  WEBKIT_LEGACY_INSPECTOR_SERVER with 9222 and 9998 ports. But i am getting raw data representation on my browser when i am accessing wpe-inspector page. I have used Google chrome and mozilla firefox as well for this.

Please see the raw data in my attachment.
chrome_response

Could you please let us what we are missing here.

@aperezdc
Copy link

aperezdc commented Nov 22, 2018

@Trinath402 It looks like the device where WPELauncher is running is missing the shared-mime-info package, which the inspector server uses (through GLib) to determine the Content-Type it has to return in its responses. Could you please try to add it to your build and try again?

@Trinath402
Copy link

Thank you @aperezdc it's worked for me. After including this package in our image i am getting the response properly.

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

No branches or pull requests

5 participants