noblox.js icon indicating copy to clipboard operation
noblox.js copied to clipboard

[BUG] Error when uploading item

Open nottisa opened this issue 1 year ago • 3 comments

const fs = require("fs");

noblox.setCookie().then(function() { //Use COOKIE from our .env file.
    console.log("Logged in!")
}).catch(function(err) {
    console.log("Unable to log in!", err)
})


async function bob() {
    await noblox.uploadItem("test", 13, fs.createReadStream("./mage.png"))
}
bob()

Expected behavior It should upload the image as a decal....

Error I get this error:

              reject(new Error('Unknown redirect: ' + location))
                     ^

Error: Unknown redirect: https://www.roblox.com/request-error?id=a654406b-ff4d-450a-bad3-d64a433a22c9&mode=&code=500
    at /workspaces/plsdonatestuff/node_modules/noblox.js/lib/asset/uploadItem.js:64:22
    at tryCatcher (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/async.js:102:5)
    at Async.drainQueues (/workspaces/plsdonatestuff/node_modules/bluebird/js/release/async.js:15:14)
    at process.processImmediate (node:internal/timers:475:21)```

nottisa avatar Mar 02 '23 16:03 nottisa

Could you look into this further? Has the API changed? have you managed to work around it?

Neztore avatar Nov 20 '23 10:11 Neztore

I could, but at the moment I'm a bit lazy, I will probably come back to this project in a couple months... The internal API documentation has been removed, at least as far as I can tell...

nottisa avatar Nov 20 '23 15:11 nottisa

We will deprecate this method and add the same functionality using open cloud

Neztore avatar May 18 '24 19:05 Neztore