Skip to content

devx: Allow to run local dev EC on mobile in same wifi#3973

Open
BillCarsonFr wants to merge 1 commit into
livekitfrom
valere/devx/run_dev_on_phone
Open

devx: Allow to run local dev EC on mobile in same wifi#3973
BillCarsonFr wants to merge 1 commit into
livekitfrom
valere/devx/run_dev_on_phone

Conversation

@BillCarsonFr
Copy link
Copy Markdown
Member

Content

Modify a bit the current setup to allow testing the local dev EC on a physical mobile device without having to create
a PR and wait for netlify.

Main changes

  • Reduce the dev certificate validity duration (iOS rejects certificates with validity periods longer than 825 days)
  • Udpated vite config with host: true to allow vite to accept external request (coming from physical device)
  • Use nip.io (service that automatically resolves domain names to IP addresses embedded within them.) This allow a very easy access for mobile apps without specific config.

🚨 IMPORTANT This PR has generated new certificates, so you will need to install them on your system again.

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Checklist

  • I have read through CONTRIBUTING.md.
  • Pull request includes screenshots or videos if containing UI changes
  • Tests written for new code (and old code if feasible).
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

Copy link
Copy Markdown
Collaborator

@Johennes Johennes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty cool! I tested this on Android and other than having to disable DNS rebinding protection in my router, this worked fine. I don't have an iOS device to test, sadly.

Comment thread docs/_developer.md
Comment on lines +110 to +113

```

```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be a leftover?

Suggested change
```
```

Comment thread docs/_developer.md

```
https://192-168-0-122.nip.io:3000/room

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Extra blank line here.

Suggested change

Comment thread docs/_developer.md

**For Element X Android Developer Tools**

In Element X's developer settings, set the Element Call URL to the same URL from step 3.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there is no step 3 above. Maybe we could just use the same language as in the iOS section?

Suggested change
In Element X's developer settings, set the Element Call URL to the same URL from step 3.
In Element X's developer settings, set the Element Call URL to the nip.io url (replace . with - in the IP address):

Comment thread docs/_developer.md
- No need to regenerate certificates when your laptop's IP changes
- Works from any device without DNS configuration
- iOS/Android treat it as a proper domain name, not an IP address
- One-time certificate setup works for all future IP addresses
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to do this on my router.

Suggested change
- One-time certificate setup works for all future IP addresses
- One-time certificate setup works for all future IP addresses
> [!IMPORTANT]
> Make sure your network router doesn't enforce DNS rebinding protection (which will
> break nip.io). If it does, try allow-listing nip.io in your router's administration interface.

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

Labels

PR-Developer-Experience Release note category. A PR that does not change EC but improves working with the repository.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants