qbcore-framework / qb-core

FiveM RP Framework Core :muscle:
GNU General Public License v3.0
586 stars 963 forks source link

[BUG] Attempt to index a nil value (field 'metadata') #1005

Closed SimpleModder closed 11 months ago

SimpleModder commented 1 year ago

Summary

Every time I join in I get the mentioned error "Attempt to index a nil value (field 'metadata')" Which means that qb-core is not pulling metadata and that affects other scripts. I would say that this error just happens on the startup because, just like some other issues related to metadata that I've seen, it starts working for the logged players as soon as I restart the script that is not working.

Reproduction

  1. Join the server
  2. Open the F8 console menu.
  3. See the errors.

Expected behavior

Basically no errors and everything working fine, HUD showing and getting updates on health, hunger, and thirst. Phone script working with QB 'PlayerJob' and stuff like that

Actual behavior

Hud doesn't show up. qb-shops give errors. The phone doesn't work.

image image image image

Additional context

This is the second time I got this problem and I don't know why, I literally have no clue. But I would like to mention that the first time I got the error, I made a fresh install of the server to solve it, and everything seemed to work, but after the first day the error came back and I'm stuck, I really have no idea of what to do. Lastly, I've seen posts on Discord forums or cfx.re, but none have solved this issue.

Last Updated

a month ago

Custom Resources

qb-shops, lb-phone, ps-hud

Resource Rename

qb-core

MohaNatar commented 1 year ago

I have the same problem on my server i dont know how it started but it keep happening and if i dont find a way to fix it soon i think im just gonna give up my dreams and stop the proyect, i feel depressed NGL

Sharkiiie commented 1 year ago

Does this happen for every player, or just 1 / several?

SimpleModder commented 1 year ago

To every player

Sharkiiie commented 1 year ago

Verify that the metadata col exists in the players table in the database.

SimpleModder commented 1 year ago

It exists and also has data.

BoogeyMan11588 commented 1 year ago

Just for hahas, can you ensure you aren't using a old outdated DB? Verify that the DB in your config file is the active DB.

On Sun, Jul 23, 2023, 11:44 SimpleModder @.***> wrote:

It exists and also has data.

— Reply to this email directly, view it on GitHub https://github.com/qbcore-framework/qb-core/issues/1005#issuecomment-1646873064, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU3CIBCNW4SULOUOGIQOT63XRVBFPANCNFSM6AAAAAA2UDHBSI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SimpleModder commented 1 year ago

I am using the correct data base. Double checked.

BoogeyMan11588 commented 1 year ago

Awesome, how long after the new build did the behavior start?

On Sun, Jul 23, 2023, 13:30 SimpleModder @.***> wrote:

I am using the correct data base. Double checked.

— Reply to this email directly, view it on GitHub https://github.com/qbcore-framework/qb-core/issues/1005#issuecomment-1646898763, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU3CIBC7HHRJT45JUQM7FXLXRVNSVANCNFSM6AAAAAA2UDHBSI . You are receiving this because you commented.Message ID: @.***>

SimpleModder commented 1 year ago

After like 12 hours

WizardOfOzcar commented 1 year ago

I've also had the same issue, did you find any solution to this?

I even tried a freshly installed server!

Bongmasta406 commented 1 year ago

Seems to me that The issue your having clearly shows user error. i have personally installed ps-hud fresh build 8:16pm mountain time 8/12 with of course qb-shops and they all work, LB-phone (dont own, so can not speak on the install process, but not loading is not a qb-core issue.)I suggest you go to LB Discord for support and close this bug report

github-actions[bot] commented 11 months ago

This issue has had 60 days of inactivity & will close within 7 days