ultra-voltlab icon indicating copy to clipboard operation
ultra-voltlab copied to clipboard

Weird characters when the script loads sometimes?

Open Dimmies opened this issue 3 years ago • 11 comments

I've started noticing this weird text showing on the top of my screen. I looked at NUI Dev Tools and found that it was coming from this script. I'm unsure of what causes this, but you can see that head tag has nothing in it and there is no DOCTYPE. Restarting the script has a chance of showing this text again.

The Text image

NUI DevTools view image

Example of another NUI view (pma-voice) image

Dimmies avatar Sep 15 '21 00:09 Dimmies

Are you using any kind of minifier or obfuscator to optimise your NUIs and scripts? Any repro steps would be helpful or if you can send a copy of your resource cause I never faced it personally

ultrahacx avatar Sep 15 '21 04:09 ultrahacx

Also if you are using Linux and have not updated your server artifact for a while then try to remove globbing from ultra-voltlab fxmanifest cause there was similar issue when files were globbed on old Linux artifact having the globbing bug

ultrahacx avatar Sep 15 '21 04:09 ultrahacx

I'm not using any minifier or obfuscator. I'm also using windows, I can give removing globbing a try if you believe it may still give results. I unfortunately have no clue how/why this happens, just that it happens what seems like randomly and I can get it to happen if I restart the script multiple times (but, randomly) - I installed a brand new copy of the script and am still noticing the issue. Unfortunately I don't have much more information at this point but I'll add onto this if I come across something worth noting.

Dimmies avatar Sep 15 '21 05:09 Dimmies

I'll also try to check it out as soon as I get some time.

ultrahacx avatar Sep 15 '21 06:09 ultrahacx

Im unable to reproduce it personally as of now but some other people seem to face it on other scripts too randomly so Im not sure if this is some FiveM issue or any error of my script cause I've personally failed to recreate it and haven't got any report from other users too. I'll follow up if I find anything useful which can solve this

ultrahacx avatar Sep 17 '21 19:09 ultrahacx

Hey, saw this was update to remove globbing of the HTML files, I've been running with no globbing and am unfortunately still experiencing the issue

I've been using this fxmanifest.lua

fx_version 'cerulean'
game {'gta5'}

author 'ultrahacx'
version '1.0.0'

files {
    'html/script.js',
    'html/screen.html',
    'html/voltage_fail.gif',
    'html/voltage_intro.gif',
    'html/voltage_success.gif',
    'html/empty.png',
    'dlc_hei4/dlc_hei4_v_mg.awc',
    'dlc_hei4/dlc_hei4_fh_mg.awc',
    'audiodata/dlchei4_game.dat151',
    'audiodata/dlchei4_game.dat151.nametable',
    'audiodata/dlchei4_game.dat151.rel',
    'audiodata/dlchei4_sounds.dat54',
    'audiodata/dlchei4_sounds.dat54.nametable',
    'audiodata/dlchei4_sounds.dat54.rel',
}

data_file 'AUDIO_GAMEDATA' 'audiodata/dlchei4_game.dat'
data_file 'AUDIO_SOUNDDATA' 'audiodata/dlchei4_sounds.dat'
data_file 'AUDIO_WAVEPACK' 'dlc_hei4'

ui_page 'html/screen.html'

client_script 'client.lua'

server_script 'server.lua'

client_script 'config.lua'

Dimmies avatar Oct 12 '21 05:10 Dimmies

It was just a precautionary measure to make sure that globbing wasn't the issue. Can you try adding the following meta tags in html and see if it works, cause I don't have the issue so I can't verify if it works or not. <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta content="utf-8" http-equiv="encoding">

ultrahacx avatar Oct 12 '21 06:10 ultrahacx

For sure, I'll give it go and let you know if I notice it anymore, thanks!

Dimmies avatar Oct 12 '21 08:10 Dimmies

Just had it happen, went awhile without it happening though, but unfortunately still experiencing the issue

Dimmies avatar Oct 14 '21 07:10 Dimmies

We got around this by separating the streamed resources into their own resource.

Appears to happen streaming certain files with NUI.

p1u3o avatar Apr 17 '22 08:04 p1u3o

To also add, this seems to have been resolved just today. https://github.com/citizenfx/fivem/issues/1405

I've been unable to test, but if it's not resolved on FiveM side, separating streamed assets (as mentioned above) will likely resolve the issue.

Dimmies avatar Apr 17 '22 19:04 Dimmies