Errors on Mobile Chrome Browser

Hello,

Few days eariler this game was woring fine on mobile device but today it is not working… :thinking:

:o: i used chrome://inspect/#devices to inspect errors and i found following warnings and errors

:warning: Warning:

Image dimensions larger than max supported texture size of 4096. Resizing from 8192, 2048 to 4096, 1024.
_downsampleImage @ playcanvas-stable.dbg.js:48763
uploadTexture @ playcanvas-stable.dbg.js:50107
setTexture @ playcanvas-stable.dbg.js:50285
draw @ playcanvas-stable.dbg.js:50370
drawInstance @ playcanvas-stable.dbg.js:11689
renderForward @ playcanvas-stable.dbg.js:12158
renderComposition @ playcanvas-stable.dbg.js:12934
render @ playcanvas-stable.dbg.js:46635
(anonymous) @ playcanvas-stable.dbg.js:47218
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:47203
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:47203
start @ playcanvas-stable.dbg.js:46603
(anonymous) @ launch.js:7280
_preloadScripts @ playcanvas-stable.dbg.js:46395
(anonymous) @ launch.js:7263
done @ playcanvas-stable.dbg.js:46337
onAssetLoad @ playcanvas-stable.dbg.js:46349
fire @ playcanvas-stable.dbg.js:326
_opened @ playcanvas-stable.dbg.js:24950
(anonymous) @ playcanvas-stable.dbg.js:24971
_onSuccess @ playcanvas-stable.dbg.js:23400
(anonymous) @ playcanvas-stable.dbg.js:23371
success @ playcanvas-stable.dbg.js:20686

:no_entry_sign: Error:

Uncaught TypeError: Cannot set property width of #<Texture> which has only a getter
    at GraphicsDevice.uploadTexture (playcanvas-stable.dbg.js:50109)
    at GraphicsDevice.setTexture (playcanvas-stable.dbg.js:50285)
    at GraphicsDevice.draw (playcanvas-stable.dbg.js:50370)
    at ForwardRenderer.drawInstance (playcanvas-stable.dbg.js:11689)
    at ForwardRenderer.renderForward (playcanvas-stable.dbg.js:12158)
    at ForwardRenderer.renderComposition (playcanvas-stable.dbg.js:12934)
    at Application.render (playcanvas-stable.dbg.js:46635)
    at playcanvas-stable.dbg.js:47218
uploadTexture @ playcanvas-stable.dbg.js:50109
setTexture @ playcanvas-stable.dbg.js:50285
draw @ playcanvas-stable.dbg.js:50370
drawInstance @ playcanvas-stable.dbg.js:11689
renderForward @ playcanvas-stable.dbg.js:12158
renderComposition @ playcanvas-stable.dbg.js:12934
render @ playcanvas-stable.dbg.js:46635
(anonymous) @ playcanvas-stable.dbg.js:47218
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:47203
requestAnimationFrame (async)
(anonymous) @ playcanvas-stable.dbg.js:47203
start @ playcanvas-stable.dbg.js:46603
(anonymous) @ launch.js:7280
_preloadScripts @ playcanvas-stable.dbg.js:46395
(anonymous) @ launch.js:7263
done @ playcanvas-stable.dbg.js:46337
onAssetLoad @ playcanvas-stable.dbg.js:46349
fire @ playcanvas-stable.dbg.js:326
_opened @ playcanvas-stable.dbg.js:24950
(anonymous) @ playcanvas-stable.dbg.js:24971
_onSuccess @ playcanvas-stable.dbg.js:23400
(anonymous) @ playcanvas-stable.dbg.js:23371
success @ playcanvas-stable.dbg.js:20686

:arrow_forward: This errors are coming on mobile device only…
:arrow_forward: It works fine on pc version…

Please help. What am i supposed to do?

For the moment, use https://launch.playcanvas.com/XXXXXXXXXX?use_local_engine=https://code.playcanvas.com/playcanvas-1.29.0.min.js

Published builds should be fine. Looks like there is a bug with the non minified versions of the engine.

Edited link:

1 Like

This PR should fix your issue; https://github.com/playcanvas/engine/pull/2205

1 Like

Just to follow up, do you really need a 8096 dimension texture? That’s incredibly high resolution and will use up a large amount of texture memory. I would recommend sampling it down to something more reasonable anyway. You app will then also be able to load faster!

I have multiple sprite sheet with bigger size which i am using for creating animation, so i think to maintain quality of sprite sheet animation the texture supposes to be bigger… :thinking:

8096 is also not supported in some mobile devices (e.g. older iPhones), so the texture can fail to load. Definitely check if you can split your sprite sheet into smaller ones.

It was working earlier…
We had private conversation there you saw that gameplay… It was the same device…
So the current update cause this issue?

8096 not supporting… if i know it earlier i would do it smaller imaegs…
But there are more than 50 images like this…
Sorry to say but doing it manually will be big pain :face_with_head_bandage:

Do i have any other options???

As mentioned, there was bug in the engine release on Wednesday. Using the URL above to specifically use the minified version should work.

In all cases, the engine will downsize the texture to a supported size. However, the user is paying that cost in download time (because they still have to download the large in the first place) and CPU time as the engine has to downsample the image at runtime.

It’s up to you what you want to do pending on your needs and what is most beneficial to you. Leave it as is, or optimise the player experience.

1 Like