codeoverflow-org / nodecg-io

A NodeCG-bundle which implements Social Media API's in the NodeCG framework
https://nodecg.io
MIT License
108 stars 26 forks source link

Configuration does not load properly and service selection does not work due to linting #34

Closed noeppi-noeppi closed 4 years ago

noeppi-noeppi commented 4 years ago

Description

Since commit Lint Everything when I restart nodecg everything is gone except the password. So when I enter a wrong password it says that the password is wrong. If I enter my correct password the nodecg-io dashboard opens but all services that I had configured previously are gone.

How to reproduce

Start nodecg, set up the twitch service and restart nodecg. The log into nodecg-io again.

Error Log

The only thing it says is that the configuration gets decrypted and loaded

info: [nodecg/lib/server] NodeCG running on http://localhost:9090
info: [nodecg-io-core] Decrypting and loading saved configuration.

References

Commit since it does not work: 140b14cf28d5b13696e3c673b849b7c8d0cc9ea0

How to solve this

When I remove the prototype?. before hasOwnProperty in file persistenceManager.ts (line 128 and 172) that were added by the Lint Everything commit it works.

hlxid commented 4 years ago

I don't understand why it doesn't work with this, but I've reverted them in 55855b8fdb4fe59dc9096cf4a431ad3dfdb9d4b5 temporarily and will investigate why this happens later.

noeppi-noeppi commented 4 years ago

So I just found out that the linting broke some more that is not because of the prototypes. I could not select any service instance in a bundle until I reverted the whole nodecg-io-core directory to it's state before linting... Don't know why but now it works again.

hlxid commented 4 years ago

@noeppi-noeppi that problem seem to be also the prototypes, but this time in the gui. Apparently prototypes don't work like I thought, will look into this.

hlxid commented 4 years ago

I didn't know how to use prototypes properly so that was my fault. Fixed in 470b5c4.