Project-Sloth / ps-housing

Advanced housing system for QBCore.
https://discord.gg/projectsloth
Other
343 stars 110 forks source link

bad argument #1 to 'decode' (string expected, got table) #224

Closed FruityQC closed 3 months ago

FruityQC commented 3 months ago

Describe the bug Initial installation of the script and migration of apartments will work no issue. However, on server restart you will start to be prompted the following error: [ script:ps-housing] SCRIPT ERROR: @ps-housing/server/server.lua:19: bad argument #1 to 'decode' (string expected, got table) [ script:ps-housing] > ref (@ps-housing/server/server.lua:21) [ script:ps-housing] > rawQuery (@oxmysql/dist/build.js:25047) [ script:ps-housing] > runMicrotasks (:0) [ script:ps-housing] > processTicksAndRejections (node:internal/process/task_queues:96)

Steps Taken

Gone through searches and attempted all fixes posted within discord. Updated SQL to latest 8.0.36 Verified script starting order to exact Ps-housing readme Attempted debugging and confirmed it was set as a table and not a string: [ script:ps-housing] Type of v.has_access: table To Reproduce Steps to reproduce the behavior: Unable to reproduce outside of QBCore, this is mostly default QB with OX_inventory designs so could be related.

Expected behavior Script starts and populates apartments.

Additional context Script will not produce any other errors outside of decode that I have found.

image image