project-error / npwd

NPWD is a FiveM phone resource written entirely in TypeScript and React.
https://projecterror.dev
Other
336 stars 277 forks source link

Bug: missing export setPhoneDisabled #1057

Closed MauriceHandwerker closed 10 months ago

MauriceHandwerker commented 11 months ago

Development Issue

Unsure

Phone Version

FiveM Linux Artifact : 6895 ESX Legacy : 1.10.1 NPWD : 1.7.3 esx-npwd : 08.08.2023 (https://github.com/overextended/esx-npwd)

Issue Description

I already have a tread in the discord open. But I think it should be a real issue.

I get this error in the client log: image

This is my config.json

{
  "PhoneAsItem": {
    "enabled": false,
    "exportResource": "my-core-resource",
    "exportFunction": "myCheckerFunction"
  },
  "general": {
    "useResourceIntegration": true,
    "toggleKey": "f1",
    "toggleCommand": "phone"
  },
  "contacts": {
    "frameworkPay": false,
    "payResource": "my-core-resource",
    "payFunction": "myCheckerFunction"
  },
  "profanityFilter": {
    "enabled": false,
    "badWords": ["esx"]
  },
  "database": {
    "useIdentifierPrefix": false,
    "playerTable": "users",
    "identifierColumn": "identifier",
    "identifierType": "license",
    "profileQueries": true,
    "phoneNumberColumn": "phone_number"
  },
  "debug": {
    "level": "error",
    "enabled": true,
    "sentryEnabled": true
  },
  "defaultContacts": [],
  "disabledApps": [],
  "apps": ["pefcl"],
  "voiceMessage": {
    "enabled": false,
    "authorizationHeader": "PE-Secret",
    "url": "",
    "returnedDataIndexes": ["url"]
  },
"images":{
  "useWebhook": true
}
}

And this is my cfg:

ensure pma-voice
ensure esx-npwd         # [phone]
ensure npwd             # [phone]

Issue Reproduction

Use the resources & and server serion from above and try using the phone.

Evidence

image

Corentin28 commented 11 months ago

Same prolem, https://discord.com/channels/791854454760013827/1130536737135931522

MauriceHandwerker commented 10 months ago

Hey any new info?

MauriceHandwerker commented 10 months ago

From what I could find out he has an error reading the config.json. But still it should be able to get the export.

MauriceHandwerker commented 10 months ago

Hey any new infos? @itschip

MauriceHandwerker commented 10 months ago

Ok I tried every version back to 1.6.0 and the error missing export setPhoneDisabled was at every version except the latest pre-release. there I have the error about the settings shema being invalid.

itschip commented 10 months ago

@MauriceHandwerker a new release is on the way from the latest pre-release (v1.7.4). You can check if that works when its' ready

MauriceHandwerker commented 10 months ago

I fixded the error: You dont need the esx-npwd resource anymore. But you need to have a item with the lable 'phone' in your inventory. But the phone as item setting must be false. Then it works without warnings or errors. I dont know why.