POST 404 error from pre_run_jquery.js on every page load

I’m getting the following error in the console:

"POST https://mydomain/version-test/user/hi 404 (Not Found) pre_run_jquery.js:2 "

The highlighted source code line in pre_run_jquery is " r.send(i.hasContent && || null)" which is part of the try/catch:

try {
   r.send(i.hasContent && || null)
} catch (e) {
   if (o)
       throw e

I have tested to find this both on a blank new page as well as in completely separate app. This does not stop app execution, but is obviously a concern.


Sounds like a plugin might be loading something globally on each of your app’s pages. Check each plugin at the bottom of each list of actions/elements and see if you see this


1 Like

This is a great suggestion and I do have plugin(s) adding to the header, but the trick is figuring out which one is the problem. If I understand correctly, if I were to uninstall each one to do process of elimination I’d wreck all the actions using them in my app.

Just tried removing all plugins from a test app and still get the error. No scripts loading in Settings.

Hmm if not plugin related then something with Bubble… :man_shrugging: Just ignore it :rofl:

1 Like

Hi, I have the exact same error from a few days, I didn’t installed any new plugin, so it’s surely due to a Bubble bug / update…

1 Like

@rob.lewis I have the Same issue! This looks like an issue with user management introduced by Bubble.

Did you get a resolution or raise a ticket for this?

After conducting a stack trace, the code snippet seems part of a larger JavaScript framework or library being used in the application. It includes an initialization function that sets up periodic actions (heartbeats) and listens to changes in user authentication state, potentially among other things. Key parts:

Heartbeat Functionality

let heartbeat = ()=>{
    this.heartbeat_interval = setInterval(()=>lib_default()"server://user/hi", null), 3e5)
this.heartbeat_interval == null && lib_default()"server://user/hi", null, heartbeat),
  • This section sets up a heartbeat function that sends a POST request to server://user/hi every 300,000 milliseconds (5 minutes) using setInterval.
  • The heartbeat function is initially invoked if this.heartbeat_interval is null, suggesting it’s meant to run periodically only if not already set up.
  • The POST request uses a custom protocol (server://), which seems internally handled by the lib_default() method. This could be part of a framework or library abstraction over the actual network requests, translating these requests to actual HTTP requests to the server.

User State Watching and Actions

    // Code omitted for brevity
    // Code omitted for brevity
  • This section sets up a watcher that tracks certain values (presumably user state and page parameters) and performs actions based on those values.
  • It includes logic for handling user login state, potentially wiping certain data when no user is detected, emitting an event on cookie opt-in, and handling redirect logic based on query parameters if the user is logged in.

Issue with POST Request to user/hi

Given the error message about a 404 Not Found for a POST request to, it’s likely that this part of the code:

lib_default()"server://user/hi", null)

is where the problematic request originates. It seems the system is attempting to send a heartbeat or keep-alive signal to the server. It is either translating the custom protocol incorrectly to an actual HTTP request, or the server endpoint (/user/hi) doesn’t exist or is not correctly configured in the testing environment.

Hopefully, the above analysis can assist the bubble development team in resolving this.

1 Like

I have not created a support ticket. Just posted here first. Thanks for the great info!

Yeah, I was seeing it too, Rob, but only in my test versions. I confirmed it across several apps. I submitted a bug report earlier today, and it actually seems to be resolved now. At least I’m no longer seeing the error.

1 Like

Agreed. Not seeing it now. Thanks!

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