project-error / npwd

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

Bug: "Failed to create your profile" when posting a tweet with image #952

Open Nanorithm opened 1 year ago

Nanorithm commented 1 year ago

Development Issue

Unsure

Phone Version

latest

Issue Description

I am on the latest release version of npwd, I set up discord webhook for image uploads and that seems to be working just fine by itself to take pictures with the camera app.

Upon further inspection it looks like when uploading from the phone's camera roll, it sets the URL as https://media.discordapp.net/attachments/ which doesn't work, but https://cdn.discordapp.com/attachments/ does work.

Issue Reproduction

  1. configure discord webhook as outlined in the documentation
  2. open twitter app
  3. new tweet
  4. attach image
  5. post tweet
  6. see error

Evidence

image

my config.json for reference:

{
    "PhoneAsItem": {
        "enabled": true,
        "exportResource": "qb-npwd",
        "exportFunction": "HasPhone"
    },
    "general": {
        "useResourceIntegration": true,
        "toggleKey": "f1",
        "toggleCommand": "phone",
        "defaultLanguage": "en"
    },
    "profanityFilter": {
        "enabled": false,
        "badWords": ["esx"]
    },
    "database": {
        "useIdentifierPrefix": false,
        "playerTable": "players",
        "identifierColumn": "citizenid",
        "identifierType": "license",
        "profileQueries": true,
        "phoneNumberColumn": "phone_number"
    },
    "debug": {
        "level": "error",
        "enabled": true,
        "sentryEnabled": true
    },
    "defaultContacts": [],
    "disabledApps": [],
    "apps": [
        "npwd_services",
        "npwd_qb_mail",
        "npwd_qb_banking",
        "npwd_qb_housing",
        "npwd_qb_racing"
    ],
    "voiceMessage": {
        "enabled": false,
        "authorizationHeader": "PE-Secret",
        "url": "",
        "returnedDataIndexes": ["url"]
    },
    "images": {
        "useWebhook": true,
        "imageEncoding": "jpg"
    },
    "twitter": {
        "showNotifications": true,
        "generateProfileNameFromUsers": true,
        "allowEditableProfileName": true,
        "allowDeleteTweets": true,
        "allowReportTweets": true,
        "allowRetweet": true,
        "characterLimit": 160,
        "newLineLimit": 10,
        "enableAvatars": true,
        "enableEmojis": true,
        "enableImages": true,
        "maxImages": 3
    }
}
KaiKingStreams commented 1 year ago

I'm having the same error here

tris-ten commented 1 year ago

same issue here, any fixes?