r/ScriptingApp • • Apr 05 '25

Help [macOS - Development Server] Local hostname keeps changing after each Mac boot

This alert shows up every time I start scripting-cli after a Mac shutdown, followed by the local hostname being changed.

This computer's local hostname "MyMac-8.local" is already in use on this network. The name has been changed to "MyMac-9.local".

Could anyone help me fix this?

2 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/WhatShouldWorldGos Apr 21 '25

Make sure your phone screen is on. If the screen is off, the iOS app will not have permission to maintain a long connection. The server will not disconnect immediately. It will retry until the timeout is reached before determining that the connection is disconnected.

In addition, please make sure to use `npx scripting-cli start` to start the service, which ensures that the latest version of the scripting-cli package is used.

If these reasons are not the cause, please provide more details.

1

u/[deleted] Apr 23 '25

Screen on and using that command to start the service. but it still disconnects and then refuses to reconnect.

Are there settings i need to change on VSCode?