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

Ajax calls fail to load files in specific scenario #4422

Closed
simonpaulkeating opened this issue Dec 16, 2020 · 5 comments
Closed

Ajax calls fail to load files in specific scenario #4422

simonpaulkeating opened this issue Dec 16, 2020 · 5 comments
Assignees
Milestone

Comments

@simonpaulkeating
Copy link

simonpaulkeating commented Dec 16, 2020

Ajax calls fail to load files in specific scenario

Files fail to load if you return from a different layout and have allowed 30 seconds or more to pass while within that layout. (Sounds nuts I know)

There is a project here: https://www.dropbox.com/s/kz3g9mtlod9aaj0/ajax-fail-example_2.c3p?dl=0

Steps to reproduce

The project makes it very simple to reproduce.

1.in the first scene the file is loaded correctly at start (Based on Ashleys example but Im loading my colours.JSON file)
2.click the button to go to the second layout
3.if you return straight away to layout one (by clicking the button), the file is loaded fine
4.HOWEVER..if you wait 30 seconds or more and THEN return to the previous scene the file will not load correctly. This happens every time. The example shows you how long has passed within the layout.

Observed result

If you leave 30 seconds or more before returning to the initial layout the file fails to load.

Expected result

Files should always load.

More details

Using Beta 229 and it also happened in 228. I did not see this in the stable everison.

System details

View details

Platform information
Browser: Chrome
Browser version: 83.0.4103.116
Browser engine: Chromium
Browser architecture: 64-bit
Context: webapp
Operating system: Windows
Operating system version: 10
Operating system architecture: 64-bit
Device type: desktop
Device pixel ratio: 0.8999999761581421
Logical CPU cores: 12
Approx. device memory: 8 GB
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
C3 release: r229 (beta)
Language setting: en-US

Local storage
Storage quota (approx): 558 gb
Storage usage (approx): 222 mb (0%)
Persistant storage: No

Browser support notes
This list contains missing features that are not required, but could improve performance or user experience if supported.

Nothing is missing. Everything is OK!
WebGL information
Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium)
Numeric version: 2
Supports NPOT textures: yes
Supports GPU profiling: yes
Supports highp precision: yes
Vendor: Google Inc.
Renderer: ANGLE (NVIDIA GeForce GTX 1070 Direct3D11 vs_5_0 ps_5_0)
Major performance caveat: no
Maximum texture size: 16384
Point size range: 1 to 1024
Extensions:

EXT_color_buffer_float
EXT_disjoint_timer_query_webgl2
EXT_float_blend
EXT_texture_compression_bptc
EXT_texture_compression_rgtc
EXT_texture_filter_anisotropic
KHR_parallel_shader_compile
OES_texture_float_linear
WEBGL_compressed_texture_s3tc
WEBGL_compressed_texture_s3tc_srgb
WEBGL_debug_renderer_info
WEBGL_debug_shaders
WEBGL_lose_context
OVR_multiview2
Audio information
System sample rate: 44100 Hz
Output channels: 2
Output interpretation: speakers
Supported decode formats:

WebM Opus (audio/webm; codecs=opus)
Ogg Opus (audio/ogg; codecs=opus)
WebM Vorbis (audio/webm; codecs=vorbis)
Ogg Vorbis (audio/ogg; codecs=vorbis)
MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5)
MP3 (audio/mpeg)
FLAC (audio/flac)
PCM WAV (audio/wav; codecs=1)
Supported encode formats:

WebM Opus (audio/webm; codecs=opus)
Video information
Supported decode formats:

WebM AV1 (video/webm; codecs=av01.0.00M.08)
MP4 AV1 (video/mp4; codecs=av01.0.00M.08)
WebM VP9 (video/webm; codecs=vp9)
WebM VP8 (video/webm; codecs=vp8)
Ogg Theora (video/ogg; codecs=theora)
H.264 (video/mp4; codecs=avc1.42E01E)
Supported encode formats:

WebM VP9 (video/webm; codecs=vp9)
WebM VP8 (video/webm; codecs=vp8)

@AshleyScirra
Copy link
Member

Thanks for the effort tracking this down, I could reproduce the problem based on this. It appears the problem is that since r226, we serve network requests to local project files using a Service Worker. However if the Service Worker is idle for too long, the browser shuts it down, and subsequent network requests to local project files fail. So this was indeed a problem that only happened after a timeout.

For the next beta I've added some extra code to make sure the Service Worker stays alive, which seems to avoid this problem. I think it will need a bit more rigorous testing to check that it's robust though, so marking to check again at next release.

@simonpaulkeating
Copy link
Author

OKay, great stuff Thanks. I will test in next release and report if there are any issues.

@RorySoh
Copy link

RorySoh commented Jan 1, 2021

Thank you @simonpaulkeating for helping them solve this, it's been a problem for me as well!

@AshleyScirra
Copy link
Member

r230 is now out, can you check again there?

Please note there's a corresponding server-side change so I'd advise clearing browser data before trying, just in case it's cached the old files.

@AshleyScirra
Copy link
Member

No response for 7 days and it appeared to be working for me, so closing.

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

3 participants