Having lots of time out issues ... "autorun.run_once timeout"

Hey there! I’m having these time-out issues. My app is very simple, it’s a timer for taking 30-second breaks every 15 minutes. This happens 3 times, after the 4th 15-minute timer/countdown ends, I have a 10-minute break and when that ends, it restarts the entire workflow in a loop.

Here is my app in read-only so you can see my workflow: https://bubble.io/page?type=page&name=index&version=test&id=taketen&tab=tabs-2

It starts timing out at random times, it could be during the first 15-minute workflow event block that counts down or it could be the third. It’s sporadic so it’s not exactly a specific event.

… and when it DOES time out it shows the native prompt alert on the front-end.

Sorry, we ran into a temporary bug and can’t complete your request. We’ll fix it as soon as we can; please try again in a bit!

This message stemmed from the autorun.run_once timeout causes the timer to not function and clicking okay, everything is at a dead stop.

autorun.run_once timeout
This error it’s linking to is this Bubble Page Load script?window._bubble_page_load_data.run_js_start = Date.now();

I’m assuming this correlates to the page load event block. My page load block consists of asking browser notification permissions, animating a simple text element, set Bubble’s progress bar to 0, animate in the progress bar and start the first timer when page loads.

What is the issue with these time outs? Is it my workflow for the event blocks that run a 15 minute timer? Is that too long where its causing these to load in the console a lot?

freezing workflows failed to return after 30 seconds. x15:formatted:68973

starting workflows failed to return after 30 seconds. x15:formatted:68973 

… and then eventually at a random time after freezing and starting it’ll show …

x15:formatted:6533 autorun.run_once timeout
at https://dhtiece9044ep.cloudfront.net/package/run_js/c8e4787…/xfalse/x15:8:1437107
at r (https://dhtiece9044ep.cloudfront.net/package/run_js/c8e4787…/xfalse/x15:8:1437224)

{timeout_seconds: 60, fn_source: '()=>{h.ensure_ready(h.scheduled_key,!1),z().app_la…[t]=m.dehydrate_tree(null!=n?n:null))}},()=>e())}', waiting_on: 'waiting on [KeyList(1) Switch autorun.scheduled_key ]', code: '1644016259169x152173492291603600'}

The line item it shows in the code for this above error goes to here …

I’m totally confused why this is happening. When I click on the

x15:formatted:6533 autorun.run_once timeout
at https://dhtiece9044ep.cloudfront.net/package/run_js/c8e4787…/xfalse/x15:8:1437107

It shows …

c.server_connection_problems ? a.reject(new b.UserError("BAD_CONNECTION")) : a.reject(new b.UnexpectedError("autorun.run_once timeout",{

Is this BAD_CONNECTION is related to my own internet? How hard can it be to just let my timer run and let’s say a few packets were dropped on my end, it really can’t connect again or keep trying before failing?

I have pinged Google for 5 hours with 0% packets drop. No actual “timeouts” on my network are happening when these occur.

Any help would be amazing!

1 Like

UPDATE: This isn’t related to your internet network connectivity. I’m incredibly certain these timeouts are happening when the tab/page is INACTIVE (e.g. not focused - aka I’m not on that tab or I’m in Photoshop) and not ACTIVE (e.g. I’m focused on the page/tab and only that)

Because I noticed the console only loads these errors when the tab is INACTIVE causing my web push notifications to not send when triggered until I go back to the inactive tab.

The whole concept of this app was to send push notifications while you are coding, designing or editing videos, anything BUT not looking at the page.

:warning: Here is the reason why it’s timing out :warning:

Budget-based background timer throttling

It operates as follows:

  • Each background tab has a time budget (in seconds) for running timers in the background.
  • A page is subjected to time budget limitations after 10 seconds in the background.
  • A timer task is allowed to run only when the time budget is non-negative.
  • After a timer has executed, its run time is subtracted from the budget.
  • The budget continuously regenerates with time (currently set to a rate of 0.01 seconds per second). Note that this budget regeneration rate can be tweaked as Chrome collects more data about throttling behavior.

:white_check_mark: THE SOLUTION :white_check_mark:

There are a number of automatic exemptions from this throttling:

  • Applications playing audio are considered foreground and aren’t throttled.
  • Applications with real-time connections (WebSockets and WebRTC), to avoid closing these connections by timeout. The run-timers-once-a-second rule is still applied in these cases.

I decided to load an audio file I created on Audacity with quiet audio (like wind through trees) and then I lowered the gain to something like -36db to start on Page Load and have it continuously loop over using the Sound Player Plugin.

I tested the web app again, hiding it in my tabs while the console was on the side … My app wasn’t timing out anymore! It worked using the audio foreground exemption so native browser clients don’t throttle my “inactive” app!

I tried using completely silent audio files with no sound and Chrome did not like that and chose to not play it at all. I’m guessing there has to be some type of audio playing, you can make this happen being impossible to hear by tuning it down to such a low gain, effectively being silent.

Pretty neat solution! Hope this helps others trying to have web apps always run when that tab is inactive.


I am getting this error even when the tab is active and just refreshed too.

Here’s the screenshot.

And it is happening on a certain page only and which has a certain plugin. But I am not sure how could that plugin be causing this. Also it is not really happening on everyone’s computer.

Any pointers?

Is this happening when you leave your app’s tab longer than 30 seconds or right off the bat even being active on that tab?

You can verify how I did mine by opening the app and leaving the tab immediately and having console show just like you have it now. Then refresh again when focused on the tab to see if it happens again.

EDIT: Apologies, I read your post wrong. You do have it active! Hmmm … What plugins are you running?

@dopetz thanks for the reply

This is the plugin that is causing it: Full Calendar Scheduler Suite Plugin | Bubble

However, like I said I don’t know how could this plugin be causing that issue.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.