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) #178

Closed Log-nx closed 4 months ago

Log-nx commented 10 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:21: 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

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.

MonkeyWhisper commented 9 months ago

Hi,

I don't see an issue with this anywhere other than maybe v.has_access: is nil due to being a table and not a string like how I discussed on Discord with you, I cannot debug this locally, send me a friend request on Discord and I can take a look at this directly in your server

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:21: 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.

ReazCho commented 9 months ago

I sent you a discord invite

Log-nx commented 9 months ago

Hi,

I don't see an issue with this anywhere other than maybe v.has_access: is nil due to being a table and not a string like how I discussed on Discord with you, I cannot debug this locally, send me a friend request on Discord and I can take a look at this directly in your server

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:21: 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.

I have sent a friend request, from discord Log We can chat this weekend if you're available on Sunday.

ReazCho commented 7 months ago

Sorry for the late text , i am still avilable for talk my discord is reaz0_0

Braanflakes commented 7 months ago

Also am running into this issue. Did you guys come to a solution?

Log-nx commented 7 months ago

Also am running into this issue. Did you guys come to a solution?

No fix thus far, been ghosted and have had no response from Monkey since his last reply unfortunately.