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

Will not load #201

Closed
moonbugs69 opened this issue Jan 8, 2022 · 14 comments
Closed

Will not load #201

moonbugs69 opened this issue Jan 8, 2022 · 14 comments

Comments

@moonbugs69
Copy link

The extension give me a loading screen and it has never loaded EVER!

@quoid
Copy link
Owner

quoid commented Jan 8, 2022

@moonbugs69

More information is needed from you in order to help.

When you created the issue, there was a template included. Can you please provide the information it asked?

System Information:
macOS or iOS version:
Userscripts version:
Safari version:
Is this issue related to script injection?
Did the test script (pasted above) successfully run on your machine?

@harshanand120
Copy link

System Information: iPhone 7 Plus
macOS or iOS version: 15.2
Userscripts version: 1.0.1
Safari version: iOS 15.2 version(?)
Is this issue related to script injection? No
Did the test script (pasted above) successfully run on your machine? n/a

The userscripts never loaded and just stays on a spinning animation.
IMG_2124

@BlackAsLight
Copy link

I've also experienced this. Sometimes the first time I try and open it, it loads, then either the second or the third time it just gives the spinning wheel. Closing everything and reopening doesn't seem to fix it. It seems to fix itself just by trying again later.

@quoid
Copy link
Owner

quoid commented Jan 10, 2022

@harshanand120 @BlackAsLight

how long do you wait before closing the extension popup?

do you have any userscripts that can be updated remotely?

Every 24 hours, on popup load, it checks your remotely update-able scripts for updates. That is one reason why the popup could hang, especially if the network signal is weak. Eventually an error would should, but you would have to have it open for a 30 seconds+ before that happens.

That's just one reason why it could hang, there are a lot of others. Ideally we'd be able to view the contents of the safari console, which would require plugging in the phone and viewing it through Desktop Safari's Develop menu, if anyone is keen on that.

@BlackAsLight
Copy link

I opened it then and counted to 60, but it didn't load or display an error. I can update and add all scripts remotely.

When it doesn't to does and back to doesn't load, that's well within a 24 hour window.
Just a few mins ago I opened it for about 15s, it was loading, I closed it, about 10s later I open it again and it loads, I close it and then open it immediately and it's back to loading. That last loading was when I counted to 60.

@quoid
Copy link
Owner

quoid commented Jan 10, 2022

@BlackAsLight can you list your system details for iphone as well?

If you are keen, you could plug in your phone to your Mac and view the contents of the popup dev tools it could give us an indication what's going on. There's a decent amount of error checking during the init process, but I am wondering if something is getting passed those checks.

Early betas had an issue with iOS 15.0 because the memory limit in iOS15.0 was 6mb, but then in 15.1 it was updated to 80 mb. If the memory limit was crossed, it could cause this behavior, but we'd need to see the console.app and the developer tools output for the phone to verify.

It's asking a lot to have you do any of that, so I understand if you don't wish to.

Here's links to what the memory limit errors looked like:

#135 (comment)

#135 (comment)

@BlackAsLight
Copy link

So took me a bit to figure out how to do it, and is it meant to be pasting it to the console or somewhere else? Because the console is empty.
Screen Shot 2022-01-11 at 01 43 48
Screen Shot 2022-01-11 at 01 45 38

@harshanand120
Copy link

harshanand120 commented Jan 10, 2022

@harshanand120 @BlackAsLight

how long do you wait before closing the extension popup?

do you have any userscripts that can be updated remotely?

Every 24 hours, on popup load, it checks your remotely update-able scripts for updates. That is one reason why the popup could hang, especially if the network signal is weak. Eventually an error would should, but you would have to have it open for a 30 seconds+ before that happens.

That's just one reason why it could hang, there are a lot of others. Ideally we'd be able to view the contents of the safari console, which would require plugging in the phone and viewing it through Desktop Safari's Develop menu, if anyone is keen on that.

I waited a good minute and a half. Actually I recently downloaded the app on my iPhone and setup the iCloud directory. It has never loaded any userscripts for me, always spinning when i am on a webpage whose userscripts are synced.

@BlackAsLight
Copy link

BlackAsLight commented Jan 10, 2022

Running window.location.reload() in the popup page's console seems to make it load instantly.
Screen Shot 2022-01-11 at 02 01 57
I forgot this bit before:
System Information: iPhone 7
macOS or iOS version: 15.1
Userscripts version: v0.1 (3)
Safari version: Whatever the latest is
Is this issue related to script injection? No
Did the test script (pasted above) successfully run on your machine? n/a

@harshanand120
Copy link

It says to enable javascript in the web inspector.
Screenshot 2022-01-10 at 8 53 07 PM

@quoid
Copy link
Owner

quoid commented Jan 11, 2022

@harshanand120 @BlackAsLight Thank you both for checking this out.

I probably should have given more detailed instructions how to check in the console and Safari dev tools.

@harshanand120

It says to enable javascript in the web inspector.

That's actually not the right place to look. What you see there is a <noscript> tag which is unrelated to the issue. More info below on how to test.

@BlackAsLight

I will give more details below, but when you first open the popup in Safari dev tools, it does not show any console message unless you refresh the popup (through the dev tools or by clicking the refresh button in the popup). When I experience a similar issue in the past, I had to refresh the popup multiple times in order to "catch" the broken load. More details below.

Testing iOS in Safari Dev Tools

1) Ensure you have the Develop menu available in Safari

You can do this by going to Safari Preferences > Advanced and checking the box that says Show Develop menu in menu bar

Screen Shot 2022-01-10 at 7 46 37 PM

2) Plug in iOS device and ensure the computer it is plugged into is trusted.

3) Once the device is plugged in, open Safari and open dev for the iOS device

Now that the device is plugged in and Safari is open you can open the dev tools for Safari through Safari on the computer.

When you click on the Develop menu item in Safari on your computer you should see your iOS device listed. In my case it is called Justin's iPhone. This will give you dev tools for each page, tab and any extension related components, like the popup.

Screen Shot 2022-01-10 at 7 51 16 PM

4) Open the Userscripts popup and relevant dev tools

In Safari, on your iOS device, open the Userscript popup. Once the popup opens, regardless if it loads properly, open the dev tools for it.

Screen Shot 2022-01-10 at 7 52 47 PM

5) Reload the popup

When the dev tools are open for the popup, reload the page through dev tools. Console message do not show if the console was opened after the messages were dispatched. That means if something went wrong and a message was logged, but dev tools were opened afterwards, you won't see the messages.

Reload, multiple times, the popup and see if any errors appear.

Screen Shot 2022-01-10 at 7 53 02 PM

6) View the console.app log

You can also view the log from console.app which gives more information. Open Applications > Utilities > Console, select the iOS device and then click start streaming.

Once you start streaming, refresh the popup as mentioned above and view what messages appear in the console.app output.

Screen Shot 2022-01-10 at 7 55 51 PM

You can filter for messages that mention userscripts but beware, important messages can sometimes be missed.

Screen Shot 2022-01-10 at 7 56 58 PM

Sometimes it is also good to filter by Errors and Faults.

Screen Shot 2022-01-10 at 7 57 55 PM


Again, thank you very much for your time, it is really valuable. If you want to send me any of those logs you can email me directly at my email (on profile page).

@quoid
Copy link
Owner

quoid commented Jan 11, 2022

Also, if you happen to look in the console.app when refreshing the popup through the dev tools, it might be good to search for mem or limit or mem limit to see if it's hitting the memory limit somehow

@BlackAsLight
Copy link

I just sent you the email containing the log I got. Although weirdly, it always loaded when I was streaming but the moment I stopped streaming, it stopped loading, so it didn't log any errors or faults and nothing came up for mem and limit

@quoid
Copy link
Owner

quoid commented Apr 8, 2022

closing due to inactivity, please re-open with more details if needed

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

4 participants