beaker icon indicating copy to clipboard operation
beaker copied to clipboard

Debugger not accessible with live "safe:" web app (ok on localhost)

Open happybeing opened this issue 9 years ago • 7 comments

Operation System: linux Beaker Version: 0.3.6-2

I'm not sure if this is happening due to a change in my app or beaker. I have been able to debug a website live on safe: before, but I've been doing so purely with localhost for a couple of weeks and now find the debugger window keeps disconnecting immediately I open it (and the website window in beaker goes black).

I can still debug with localhost but I would like the RS guys to be able to look at stuff I deploy on safe and have access to the debugger.

You can try this as follows (on SAFE Test11):

  • Start SAFE Launcher and ensure you are connected (to Test 11)
  • Start beaker
  • Visit: safe://myfd.rsports
  • Open the debug window (Ctrl-Alt-I)
  • At the point the debug window opens but immediately shows a disconnection error, and the website window goes black.

happybeing avatar Nov 05 '16 21:11 happybeing

This seems to be fixed. Not sure if this is a change in my code or an update to beaker, but anyway with 0.4.0 the debugger is fine at the moment (with safe://myfd.rsports).

happybeing avatar Nov 14 '16 21:11 happybeing

Um, not sure why it seemed to go away above, but it is currently happening with beaker 0.4.0

Start SAFE beaker
Visit safe://myfd.rsports (page loads)
View > Toggle DevTools

Poof! Page goes black and dev tools shows error message

happybeing avatar Nov 16 '16 14:11 happybeing

@joshuef Any chance you can take a look at this?

Just checked with beaker 0.4.3-0 and seems reliable as follows:

Start launcher / beaker Visit safe://myfd.rsports/ - you should see the myfavoritedrinks UI Ctrl-Alt-I (to open debugger)

At this point you are probably fine, but if you visit the Applications tab in the debugger "poof!" there's a problem: popup says debugger has disconnected / App UI goes black.

Seems there's no way use debugger Applications tab (e.g. and view the storage) without it having disconnected from the app and the app UI going black.

If you navigate to Console and Ctrl-Shift-R the debugger sometimes works again, until you visit the Applications tab. At other times I can't get the debugger to connect again regardless of the tab I select.

happybeing avatar Dec 03 '16 16:12 happybeing

Okay, I can replicate this at least. Now sure why this would be happening, but I'll dig around.

joshuef avatar Dec 07 '16 12:12 joshuef

Happening with all safe and beaker sites, and not http sites as far as I can tell...

joshuef avatar Dec 07 '16 12:12 joshuef

Aha: https://github.com/electron/electron/issues/7184

Problem arises around setup of protocol schemes it seems.

joshuef avatar Dec 07 '16 14:12 joshuef

What's the plan here Josh - seems like by default they've disabled local storage on custom schemes which we don't want, and I see the solution appears to be:

@ tarjei register the custom scheme as a standard scheme using protocol.registerStandardSchemes api.

See: https://github.com/electron/electron/issues/7184#issuecomment-246968107

happybeing avatar Dec 14 '16 15:12 happybeing