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

Issues loading configuration on Safari #582

Open
EdwardMoyse opened this issue Jun 15, 2023 · 0 comments
Open

Issues loading configuration on Safari #582

EdwardMoyse opened this issue Jun 15, 2023 · 0 comments

Comments

@EdwardMoyse
Copy link
Collaborator

EdwardMoyse commented Jun 15, 2023

Initially I included this as part of #570, but I think in fact it is different, so let me open a new ticket.

I think it must be a problem with async calls in some manner I really don't understand, but it seems to be in loadFile from https://github.com/HSF/phoenix/blob/main/packages/phoenix-event-display/src/helpers/file.ts

To debug this I put a console.log() in state-manager.ts loadStateFromJSON

When I open phoenix and try to manually load a configuration file, I do not see this output i.e. the configuration file is not loaded (this explains the weird problems that I and others have been having).

If, however, I set a breakpoint at line 30 of file.ts, then I DO see this output. So it seems like forcing the code to stop there allows something else to happen in time?

Digging a bit deeper it seems like the input.onChange

inputFile.onchange = (e: any) => {

If I change the code to

  inputFile.click();
  setTimeout(() => {
    console.log('Let us just wait a second');
}, 1000);
};

then it works as expected (but obviously this is a hack and not a fix).

I only see this problem on Safari.

Pinging @9inpachi and @DamianArado, who will certainly have a better idea what could be causing this than I do!

EdwardMoyse added a commit that referenced this issue Aug 18, 2023
This is NOT a clean solution but I do not know what else to try
EdwardMoyse added a commit that referenced this issue Aug 25, 2023
This is NOT a clean solution but I do not know what else to try
EdwardMoyse added a commit that referenced this issue Aug 25, 2023
Attempt to workaround Issuing loading configuration on Safari #582
@EdwardMoyse EdwardMoyse changed the title Issuing loading configuration on Safari Issues loading configuration on Safari May 14, 2024
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

1 participant