Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API fails to start on 5.13 #409

Closed
an0nfunc opened this issue May 26, 2024 · 4 comments
Closed

API fails to start on 5.13 #409

an0nfunc opened this issue May 26, 2024 · 4 comments
Assignees
Labels
Available in next release bug Something isn't working

Comments

@an0nfunc
Copy link

Not sure why, but after 5.13 the API does not seem to start anymore:

tidal-hifi --trace-warnings
(node:11369) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of null (reading 'type')
    at TagParser.parseThis (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:613:91)
    at TagParser.parse (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:768:34)
    at parseTag (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:789:26)
    at Object.parse (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:867:23)
    at build (/opt/tidal-hifi/resources/app.asar/node_modules/swagger-jsdoc/src/specification.js:227:39)
    at module.exports (/opt/tidal-hifi/resources/app.asar/node_modules/swagger-jsdoc/src/lib.js:32:10)
    at startApi (/opt/tidal-hifi/resources/app.asar/ts-dist/features/api/index.js:23:47)
    at /opt/tidal-hifi/resources/app.asar/ts-dist/main.js:180:85
    at Generator.next (<anonymous>)
    at fulfilled (/opt/tidal-hifi/resources/app.asar/ts-dist/main.js:5:58)
    at emitUnhandledRejectionWarning (node:internal/process/promises:200:15)
    at processPromiseRejections (node:internal/process/promises:296:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
(node:11369) TypeError: Cannot read properties of null (reading 'type')
    at TagParser.parseThis (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:613:91)
    at TagParser.parse (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:768:34)
    at parseTag (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:789:26)
    at Object.parse (/opt/tidal-hifi/resources/app.asar/node_modules/doctrine/lib/doctrine.js:867:23)
    at build (/opt/tidal-hifi/resources/app.asar/node_modules/swagger-jsdoc/src/specification.js:227:39)
    at module.exports (/opt/tidal-hifi/resources/app.asar/node_modules/swagger-jsdoc/src/lib.js:32:10)
    at startApi (/opt/tidal-hifi/resources/app.asar/ts-dist/features/api/index.js:23:47)
    at /opt/tidal-hifi/resources/app.asar/ts-dist/main.js:180:85
    at Generator.next (<anonymous>)
    at fulfilled (/opt/tidal-hifi/resources/app.asar/ts-dist/main.js:5:58)

Installed from AUR.

@Mastermindzh Mastermindzh self-assigned this May 27, 2024
@Mastermindzh Mastermindzh added bug Something isn't working Available in next release labels May 27, 2024
@Mastermindzh
Copy link
Owner

This happens because it tries to build swagger.json in the runtime which is an issue in itself.
I will publish a hotfix later today for now and look into a proper solution when the time allows.

My apologies 😄

@an0nfunc
Copy link
Author

an0nfunc commented May 27, 2024

No worries, stuff happens.

edit: This seems to also explain why it scanned the homedir, good to know. I had some permission errors because there were some chroots lying around in my ~ from some projects, which of course tidal (or swagger I guess) failed to read.

@Mastermindzh
Copy link
Owner

Yeah, I tested the release build for myself now and also noticed permission errors 😄.
Tidal definitely isn't supposed to scan any directories except it's own for any reason whatsoever.

I did quite a deep during my break at work to find out WHY it is scanning folders because I don't want anyone getting weird ideas.
Turned out that swaggerjsdoc scans all directories for jsdoc annotations, luckily nothing more severe.
I will rewrite the build steps to just generate swagger specifications BEFOREhand and remove the entire dependency on swaggerjsdoc from the runtime. (basically what the hotfix did, but automated)

Am still @ work so steps to release 5.13.1 are progressing slowly (whenever I have waiting time @ work I will check on some progress LOL).

Should be soon now!

@Mastermindzh
Copy link
Owner

I just pushed to the AUR.
You can download the .pacman file from the release page as well if you want.

Should all work now 😄!
If not just open the issue again.

Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Available in next release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants