Skip to content
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

File editor wont load files without an internet connection #3699

Closed
magiva opened this issue Jul 24, 2024 · 14 comments
Closed

File editor wont load files without an internet connection #3699

magiva opened this issue Jul 24, 2024 · 14 comments

Comments

@magiva
Copy link

magiva commented Jul 24, 2024

Describe the issue you are experiencing

I load file editor, select a file to load and nothing loads
the editor looks weird too with a blank horizontal bar top right, i can type in it but it doesnt do anything

image

Log:
INFO:2024-07-24 14:16:37,138:hass_configurator.configurator:172.30.32.2 - "GET /api/listdir?path=. HTTP/1.1" 200 -
INFO:2024-07-24 14:16:38,200:hass_configurator.configurator:127.0.0.1 - "GET / HTTP/1.1" 200 -
INFO:2024-07-24 14:16:40,234:hass_configurator.configurator:172.30.32.2 - "GET /api/file?filename=/homeassistant/configuration.yaml HTTP/1.1" 200 -

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

File editor

What is the version of the add-on?

5.8.0

Steps to reproduce the issue

  1. open file editor
  2. select file to open
  3. observe that nothing has been loaded
    ...

System Health information

There are currently no repairs available

Anything in the Supervisor logs that might be useful for us?

nothing and nothing related to file, editor or add-on

Anything in the add-on logs that might be useful for us?

No response

Additional information

No response

@as-kholin
Copy link
Contributor

Adding a single data point - I cannot reproduce.

Using HAOS 2024.7.3 and File Editor 5.8.0, I am not seeing the behavior you describe.

The horizontal bar you describe is normal - that is where File Editor tells you what file you are viewing/editing - but I cannot reproduce the issue you are seeing from my side where the file does not load, and it does not tell you the file name on that bar - Selection dialog appears to be working the same as any other time, and no issues loading files

image

System Information provided for comparative diagnosis.

System Information

version | core-2024.7.3

Home Assistant OS -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.12.4 os_name | Linux os_version | 6.6.33-haos arch | x86_64 timezone | America/Chicago config_dir | /config
Home Assistant Supervisor
host_os Home Assistant OS 12.4
update_channel stable
supervisor_version supervisor-2024.06.2
agent_version 1.6.0
docker_version 26.1.4
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons File editor (5.8.0), (others redacted)
Dashboards
dashboards 8
resources 6
views 14
mode storage
Recorder
oldest_recorder_run July 20, 2024 at 01:00
current_recorder_run July 28, 2024 at 00:49
estimated_db_size 497.14 MiB
database_engine sqlite
database_version 3.45.3

@magiva
Copy link
Author

magiva commented Aug 9, 2024

i found the reason to be that i block cloudflare.com

image

as soon as i set it as trusted. it loads.
why would i need to have outside access to cloudflare to be able load locally ?

@magiva
Copy link
Author

magiva commented Aug 9, 2024

image

This needs to be a disconnected system, how can it be fixed so it runs fully locally, i always thought that was the point of home assistant.

@magiva magiva changed the title File editor wont load files since update to 2024.7.3 File editor wont load files without an internet connection Aug 11, 2024
@Likqez
Copy link

Likqez commented Aug 30, 2024

Hi, I didn't find the source code for the file-editor add-on here on GitHub. But if it indeed is OSS, you could potentially remove the dependencies by serving the Cloudflare JS locally. As you stated, The functionality shouldn't require an active connection to 3rd parties.

It's also possible that the cdn portions are from https://github.com/ajaxorg/ace, which is used to power the File-editor.

Good Luck.

@OdinVex
Copy link

OdinVex commented Sep 1, 2024

Who maintains this add-on? They're the ones that could look into fixing this privacy (and functionality) issue...

Edit: Add-on info shows https://github.com/home-assistant/addons/tree/master/configurator as source.
Edit: I'd recommend setting up SSH and using FileZilla for now...

@Likqez
Copy link

Likqez commented Sep 7, 2024

Edit: Add-on info shows https://github.com/home-assistant/addons/tree/master/configurator as source.

Yes, but do you actually see any source in there?
I did some more digging and it seems like this is the UI portion of the source.

The README.md states:

IMPORTANT: The configurator fetches JavaScript libraries, CSS and fonts from CDNs. Hence it does NOT work when your client device is offline. And it is only available for Python 3.

But i think we could circumvent that and help create a PR there that fixes the issue.

@OdinVex
Copy link

OdinVex commented Sep 7, 2024

Edit: Add-on info shows https://github.com/home-assistant/addons/tree/master/configurator as source.

Yes, but do you actually see any source in there? I did some more digging and it seems like this is the UI portion of the source.

The README.md states:

IMPORTANT: The configurator fetches JavaScript libraries, CSS and fonts from CDNs. Hence it does NOT work when your client device is offline. And it is only available for Python 3.

But i think we could circumvent that and help create a PR there that fixes the issue.

The link I linked to was "official" and has commits from 7m and 10m ago versus 2 years for the link you sent. Going by official link and age.

@Likqez
Copy link

Likqez commented Sep 8, 2024

Yes @OdinVex, but taking a look at the offical repositories Dockerfile you see that they uses pip3 install hass-configurator which is the repo I mentioned. Our problem is from the UI, the official repository however doesn't have any source code representing the UI.

TBH. it's just a shitty documented repository, where you actually have to dig to find out what dependencies they are using.

@OdinVex
Copy link

OdinVex commented Sep 8, 2024

Yes @OdinVex, but taking a look at the offical repositories Dockerfile you see that they uses pip3 install hass-configurator which is the repo I mentioned. Our problem is from the UI, the official repository however doesn't have any source code representing the UI.

TBH. it's just a shitty documented repository, where you actually have to dig to find out what dependencies they are using.

I see now, similar in concept to Arch's AUR's PKGBUILD files.

@Likqez
Copy link

Likqez commented Sep 8, 2024

For all,

TLDR:

This is a duplicate of: danielperna84/hass-configurator#177 which describes the situation! Check that out.

The Source code responsible for the UI and the external CDN requests: danielperna84/hass-configurator

WIP build(but stale) trying to get rid of CDN dependencies on the offline Branch.

If we implement this offline functionality, we will get it into home assistant!
See #1820 (comment)

@starsoccer
Copy link

+1 would be great to get this working totally offline

@frenck
Copy link
Member

frenck commented Sep 25, 2024

As per above, this is an issue with/feature request for the upstream hass-configurator. Please track the issue on their end instead.

Thanks! 👍

../Frenck

@frenck frenck closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
@magiva
Copy link
Author

magiva commented Sep 25, 2024 via email

@frenck
Copy link
Member

frenck commented Sep 25, 2024

@magiva Sorry?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants