'null' file getting called

Greetings!

So, let me clear this a bit. This isn’t really a problem, it’s just that I’m a bit curious.

So, I opened Developer Tools in Chrome and checked that there’s always one (same) warning in my console. It refers to something 404, so, I checked in the network tab to see which file (probably) is giving that error. Apparently, there’s a file named ‘null’ which keeps getting cancelled. I don’t really know what that means, but, if anyone can explain me why exactly the network tab is showing the file getting called and cancelled, that’d be great. Is that something expected to happen?

:man_shrugging: Can you share your Hype document?

Looks to be font or iframe widget related – can you see if it still happens if you remove the fonts or iframes from your document? (Duplicate your file + make a backup first)

Sorry, I couldn’t really upload that document and thought that it might get solved without it and it did.

I belive it’s because of the iframes because I just deleted those and didn’t touch the fonts and the ‘null’ wasn’t loading anymore. Does this happen to all iframes? Because mine was just a simple HTML5 tag that was embedding a video from an external source. If it doesn’t can you specify why it might have happened that way in my case?

P.S.: I’ll add a mini-version of my file later, just caught up in something. Came here to update the thread.

Your running into the same-origin-policy (at least thats what I see in your debugging info above). Read about what is allowed and what not here:

And here is a great introduction on how to handle iFrames:

@Daniel Here’s the file: Scene.hype.zip (31.6 KB)

And here’s the live URL of this problematic scene if anyone wants to have a look: https://www.bubblebreaker.ml/test/index.html

Well, the same-origin warning in console was probably something related to Cloudflare as I have fixed it now. This is the updated console for the problematic scene:

So, yeah, that does indicate that the problem is with the iframes, but, what exactly is the issue? Why are they shown as cancelled (however, they load fine for the end user).

Just to make sure… do you have an AdBlocker or anything else filtering the content? Maybe a fire wall or router with extra features? Are you previewing from Hype (who spins up a little server)? Or are you just launching the file from the export in the “file://” context?

I just saw you put a file in the thread and a link. Everything works on my end!

Nope. I’m using the Chrome ‘Guest’ profile to test. It basically has no extensions, no cache, cookies, etc. No firewall ou router script either. I’m not previewing from Hype. I’m previewing from the actual server on which I’m gonna host the website.

And that means, no errors, no cancelled files, nothing at all? Well, the page looks fine to me too, but, it’s only when I open up the developer tools (network tab) I see that there are some problems. I am just not sure if it’s safe to ignore those errors and would like to know if I can avoid them.

Ups… wrong panel

Seams like another Runtime error. The assignment of the iframeElement.src = iframeSrc; in updateIFrameSource() occurs multiple times. Maybe the browser is just saying “enough already” :slight_smile: as the resource has been requested before and is already loading.

Why do you use iFrames at all… Why not just put the video into the inner HTML of an element?

1 Like

Well, thanks for the info. So, if you’re correct, it means, at this moment, I don’t really need to bother much about it. However, I’ll update it using the way you suggested.

Well, let’s just say, I thought, if we directly have an option of adding a HTML element, why do it using the inner HTML method? It’s now that I understood that they work differently as I had never really used inner HTML before though I was aware about it.

Thanks a lot for the help.

1 Like

HTML widgets are great for embedding fully composed self-contained pages (via setting a ‘source URL’) or insulating HTML content from your Hype scene. For a regular video element like you have:

<video width="100%" controls><source src="https://video.wixstatic.com/video/0b5bb1_5681335fd72d4a8aa2aa90a90562e52d/720p/mp4/file.mp4" type="video/mp4"></video>

… this is a regular HTML element that doesn’t require any external JavaScript or anything fancy. So it doesn’t need to be ‘insulated’ within a frame / HTML widget.

1 Like

Got it. I’ll remember that. Thanks.