-
Notifications
You must be signed in to change notification settings - Fork 953
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
Question: [js-flipper] supported device types, localhost connection, unique device id #3319
Comments
|
Hey @usrbowe! Thank you for your interest in
Did you try it or is it just a theory? I was thinking that the
Great idea! We definitely should add it to our list of options for
Do you think it would add significant value considering that we have
It should be possible to connect from any non-browser device by passing "Origin" header set to "localhost". For browsers, we have this list to prevent malicious sites developers could visit easily accessing Flipper's data. We should make it configurable by reading it from settings.json. Would it help?
Nice catch! I guess |
Good thinking! We are actually exploring various ideas including one that looks really close to yours to re-think the entire certificate exchange flow. Speaking about security, it sounds like a great way to authorize connections between JS devices and Flipper! The only concern is with how it affects developer experience. @passy @mweststrate WDYT? |
@aigoncharov thanks for reply, somehow missed this. I forgot to point that I'm testing this connection for simpler React Native connection (without the native Flipper SDK).
os not available |
I think we could probably provide QR code on Flipper app, which devices could scan to at least get the IP address of host. Also this could cover the secure connection exchange. |
Polyfilling issue for the |
Summary: Linked to #3319 Reviewed By: passy Differential Revision: D36786952 fbshipit-source-id: f3214f35039845a8e35fa14e63f509a6fbdddb1f
|
Nice, this works really well 👍 I think we can close this issues, as all major issues were resolved. For the connection, that can be done in general for entire Flipper, not just js connection. |
I've been testing the new
js-flipper
, and was planning to have a way to connect RN apps, without the native Flipper SDK (this might be also the way Expo could adopt Flipper).There are few problems so far:
the
os
package is no longer polyfilled by webpack (so also latest create react app will not be able to use thejs-flipper
).supported devices
Browser
orNode.JS
is quite limiting factor. I think we could have a way to pass on device type when we runflipperClient.start
to tell Flipper how to display the device and list supported plugins.flipper/js/js-flipper/src/util.ts
Lines 49 to 60 in 11c3a20
3. Valid websocket connection prefixes will only accept'chrome-extension://', 'localhost:', 'http://localhost:', 'app://'
. Which makes it impossible to connect from other device. Actually would like to know more details on why this limitation exist, maybe could have some opt out or other way to accept connections from non localhost.For Node/RN can provide custom
origin: localhost
header.flipper/desktop/flipper-server-core/src/comms/BrowserServerWebSocket.tsx
Lines 150 to 152 in 11c3a20
react-flipper-example
, every time the connection is established there will be new device added and previous connection marked sOffline
. I think we might need have some way to assign same browser/apps to existing connection.The text was updated successfully, but these errors were encountered: