esprfid / esp-rfid

ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS
MIT License
1.37k stars 424 forks source link

Compiling error. #464

Closed CentauriDK closed 2 years ago

CentauriDK commented 3 years ago

Hi I have some trouble comping this project. I have just tried reinstalling Visual Code and Platform IO all with the newest version. But I get 37 errors when trying to compile this project. Is there any special version of the different libraries that have to be specified manually or something since it now working right out of the box.

I get the following errors. And hir as image. image

[{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonObject.hpp", "owner": "cpp", "severity": 8, "message": "no matching function for call to 'ArduinoJson::JsonVariant::as<long long int>() const'", "startLineNumber": 283, "startColumn": 46, "endLineNumber": 283, "endColumn": 46 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, long long int>'", "startLineNumber": 150, "startColumn": 3, "endLineNumber": 150, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, long long int>'", "startLineNumber": 156, "startColumn": 3, "endLineNumber": 156, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, long long int>'", "startLineNumber": 165, "startColumn": 3, "endLineNumber": 165, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, const char*>'", "startLineNumber": 175, "startColumn": 3, "endLineNumber": 175, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, long long int>'", "startLineNumber": 183, "startColumn": 3, "endLineNumber": 183, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, ArduinoJson::JsonArray&>'", "startLineNumber": 198, "startColumn": 3, "endLineNumber": 198, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, const ArduinoJson::JsonArray&>'", "startLineNumber": 208, "startColumn": 3, "endLineNumber": 208, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, ArduinoJson::JsonObject&>'", "startLineNumber": 219, "startColumn": 3, "endLineNumber": 219, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, const ArduinoJson::JsonObject&>'", "startLineNumber": 230, "startColumn": 3, "endLineNumber": 230, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.pio/libdeps/generic/ArduinoJson/src/ArduinoJson/JsonVariant.hpp", "owner": "cpp", "severity": 8, "message": "no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, long long int>'", "startLineNumber": 238, "startColumn": 3, "endLineNumber": 238, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.vscode/c_cpp_properties.json", "owner": "c:\\Users\\kim\\Desktop\\ESP_RFID_Demo\\esp-rfid", "severity": 4, "message": "Cannot find \"C:\\Users\\kim\\Desktop\\ESP_RFID_Demo\\esp-rfid\\include\".", "startLineNumber": 11, "startColumn": 17, "endLineNumber": 11, "endColumn": 70 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/.vscode/c_cpp_properties.json", "owner": "c:\\Users\\kim\\Desktop\\ESP_RFID_Demo\\esp-rfid", "severity": 4, "message": "Cannot find \"C:\\Users\\kim\\Desktop\\ESP_RFID_Demo\\esp-rfid\\include\".", "startLineNumber": 67, "startColumn": 21, "endLineNumber": 67, "endColumn": 74 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/config.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 3, "startColumn": 20, "endLineNumber": 3, "endColumn": 20 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/log.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 9, "startColumn": 18, "endLineNumber": 9, "endColumn": 18 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/log.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 22, "startColumn": 19, "endLineNumber": 22, "endColumn": 19 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/log.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 34, "startColumn": 18, "endLineNumber": 34, "endColumn": 18 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/log.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 64, "startColumn": 19, "endLineNumber": 64, "endColumn": 19 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/main.cpp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 188, "startColumn": 7, "endLineNumber": 188, "endColumn": 7 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/main.cpp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 193, "startColumn": 7, "endLineNumber": 193, "endColumn": 7 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/main.cpp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 324, "startColumn": 3, "endLineNumber": 324, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/main.cpp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 326, "startColumn": 3, "endLineNumber": 326, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/rfid.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 210, "startColumn": 11, "endLineNumber": 210, "endColumn": 11 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/websocket.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 28, "startColumn": 3, "endLineNumber": 28, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/websocket.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 32, "startColumn": 12, "endLineNumber": 32, "endColumn": 12 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/websocket.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 78, "startColumn": 3, "endLineNumber": 78, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/websocket.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 83, "startColumn": 3, "endLineNumber": 83, "endColumn": 3 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/websocket.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 91, "startColumn": 12, "endLineNumber": 91, "endColumn": 12 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/websocket.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 123, "startColumn": 21, "endLineNumber": 123, "endColumn": 21 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/wsResponses.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 7, "startColumn": 12, "endLineNumber": 7, "endColumn": 12 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/wsResponses.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 17, "startColumn": 13, "endLineNumber": 17, "endColumn": 13 },{ "resource": "/c:/Users/kim/Desktop/ESP_RFID_Demo/esp-rfid/src/wsResponses.esp", "owner": "cpp", "severity": 4, "message": "'SPIFFS' is deprecated: SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]", "startLineNumber": 52, "startColumn": 7, "endLineNumber": 52, "endColumn": 7 }]

joelgamal commented 3 years ago

try ArduinoJson version 5.13.4 and arduino core 2.x.x not 3.x.x

sinclairfr commented 2 years ago

I'm having the same issues, so many errors, how did they manage to do a release for version 1.3.x with all those errors?

omersiar commented 2 years ago

These errors weren't exist three years ago. Luckily platformio can be configured to download specific version of all dependencies. 😊

https://en.wikipedia.org/wiki/Software_rot

zgibsonTFCC commented 2 years ago

I am having the same issue. It looks like platformIO is set to use the ArduinoJson library version 5.13.4 but I am not too sure what else needs to be changed here. Any other feedback or advice would be greatly appreciated.

sinclairfr commented 2 years ago

what helped me is running platformio run -t clean and then platformio run and also make sure that ArduinoJson@5.13.4 is written ArduinoJson @ 5.13.4 For some weird reason that did the trick on my mac running VSCode

sinclairfr commented 2 years ago

also#define ARDUINOJSON_USE_LONG_LONG 1 in main.cpp file You can also try to delete the .pio folder, that helps sometimes to get a clean slate.

AGordiGuerrero commented 2 years ago

I do not manage to compile. After including the ArduinoJson@5.13.4 and including the #define, I still have a lot of errors related with it. For example:

lib/ArduinoJson/src/ArduinoJson/JsonObject.hpp:283:46: error: no matching function for call to 'ArduinoJson::JsonVariant::as<long long int>() const'

lib/ArduinoJson/src/ArduinoJson/Deserialization/../JsonVariant.hpp:150:3: error: no type named 'type' in 'struct ArduinoJson::Internals::EnableIf<false, long long int>

I am running it on Ubuntu 20.04.2 with PlatformIO Core, version 5.2.3. Python 3.8.10, although I have also installed Python 2.7.18. Now is using Python3 (as said by python --version).

Can anyone help? How can I use arduino core 2.x.x instead of 3.x.x?

AGordiGuerrero commented 2 years ago

Wow! I compile it using the old Espressif core. Changing the platformio.ini file putting:

platform = espressif8266@2.6.3

matjack1 commented 2 years ago

Were you trying to build the stable branch or the dev branch? Unfortunately I think that dev is much better off now, can you please confirm?

@omersiar what would you think would be needed to release a new version of esp-rfid? I think that dev is in much better place than stable now?

matjack1 commented 2 years ago

I'm going to close this for now as I think there's no more interest, but please reopen if you need any help

fdiazf19 commented 2 years ago

Hello, is there any way to compile the stable branch? I've been trying the dev one but there is many bugs related to Access Log and adding new users compared to stable branch compiled files. This happens when i use a card in the reader, instead of showing the typical add user tab: image

Access Logs shows saved cards (with Access type set as "Always") as access disabled and just for holding it a moment close to the reader produce many log access. This is an example of using (just for a second) one of the cards assigned to a user: image

As you can see this user had previously been registered: image

i'm using NodeMcu v3, MCRC-522 reader and VSCode. I have not modified the code yet. Thanks in advance.

matjack1 commented 2 years ago

hey @fdiazf19 have you tried to install the new branch on an esp with data created with the stable branch? Maybe that's why is not working properly with existing data?

The stable doesn't build anymore because the platfom and the libraries didn't have specific versions specified and so now it's fetching the latest ones and doesn't build.

Unfortunately I don't know which version was working the last time and soon we'll release a new stable version, so maybe you can try getting 1.x releases from here: https://github.com/esprfid/esp-rfid/releases as binaries directly?