ultrahacx / ultra-voltlab

Cayo Perico Voltlab Hacking Minigame made for FiveM.
https://forum.cfx.re/t/release-voltlab-hacking-minigame-cayo-perico-mission/3933171
Other
52 stars 21 forks source link

Weird characters when the script loads sometimes? #3

Open Dimmies opened 3 years ago

Dimmies commented 3 years ago

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

ultrahacx commented 3 years ago

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 commented 3 years ago

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

Dimmies commented 3 years ago

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.

ultrahacx commented 3 years ago

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

ultrahacx commented 3 years ago

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

Dimmies commented 3 years ago

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'
ultrahacx commented 3 years ago

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">

Dimmies commented 3 years ago

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

Dimmies commented 3 years ago

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

p1u3o commented 2 years ago

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

Appears to happen streaming certain files with NUI.

Dimmies commented 2 years ago

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.