Skip to content

client.ip always reports "127.0.0.1" when accessed via On Air #4786

@ffilotto

Description

@ffilotto

First Check

  • I added a very descriptive title here.
  • This is not a Q&A. I am sure something is wrong with NiceGUI or its documentation.
  • I used the GitHub search to find a similar issue and came up empty.

Example Code

from nicegui import ui, Client

@ui.page('/')
async def index(client: Client):
    await client.connected()
    ui.label(f'Your IP is {client.ip}')

ui.run(on_air='xxx')

Description

Dear all,
first of all, great framework!

I am having a related issue to #875 that should have been solve by PR #877.

When calling "client.ip" I always only get the localhost 127.0.0.1, even if the IP should be different!

NiceGUI Version

2.3.0

Python Version

3.12.10

Browser

Firefox

Operating System

Windows

Additional Context

using on-air from the phone (android) connected to network so to get definitely a different IP.

Metadata

Metadata

Assignees

Labels

analysisStatus: Requires team/community inputbugType/scope: Incorrect behavior in existing functionality⚪️ minorPriority: Low impact, nice-to-have

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions