rch-goldsnaker / thingsboard-rpc-tutorial

5 stars 4 forks source link

Build failed! 'RPC_Response' does not name a type #3

Closed MannimMond86 closed 3 months ago

MannimMond86 commented 3 months ago

Hello, I am having trouble with using the youtube tutorial and wokwi. Maybe bug in the esp32 file at wokwi ?

I need to have the following libraries to run the script, else i get info that they are missing:

image

Thingsboard latest ( 0.13.0 ) ArduinoMqttClient latest ( 0.1.9 ) PubSubClient latest ( 2.8.0 ) ArduinoHttpClient latest ( 0.6.0 )

sketch.ino:30:1: error: 'RPC_Response' does not name a type 30 | RPC_Response processSetLedStatus(const RPC_Data &data); | ^~~~ sketch.ino:35:33: error: 'processSetLedStatus' was not declared in this scope 35 | RPC_Callback{ "setLedStatus", processSetLedStatus } | ^~~~~~~ sketch.ino:35:53: error: no matching function for call to 'RPC_Callback::RPC_Callback()' 35 | RPC_Callback{ "setLedStatus", processSetLedStatus } | ^ In file included from /libraries/ThingsBoard/src/ThingsBoard.h:7, from sketch.ino:3: /libraries/ThingsBoard/src/RPC_Callback.h:34:5: note: candidate: 'RPC_Callback::RPC_Callback(const char, Callback<void, const ArduinoJson::V6214PB2::JsonVariantConst&, ArduinoJson::V6214PB2::JsonDocument&>::function)' 34 | RPC_Callback(char const const methodName, function cb) | ^~~~ /libraries/ThingsBoard/src/RPC_Callback.h:34:5: note: conversion of argument 2 would be ill-formed: /libraries/ThingsBoard/src/RPC_Callback.h:22:5: note: candidate: 'RPC_Callback::RPC_Callback()' 22 | RPC_Callback() = default; | ^~~~ /libraries/ThingsBoard/src/RPC_Callback.h:22:5: note: candidate expects 0 arguments, 2 provided /libraries/ThingsBoard/src/RPC_Callback.h:19:7: note: candidate: 'RPC_Callback::RPC_Callback(const RPC_Callback&)' 19 | class RPC_Callback : public Callback<void, JsonVariantConst const &, JsonDocument &> { | ^~~~ /libraries/ThingsBoard/src/RPC_Callback.h:19:7: note: candidate expects 1 argument, 2 provided /libraries/ThingsBoard/src/RPC_Callback.h:19:7: note: candidate: 'RPC_Callback::RPC_Callback(RPC_Callback&&)' /libraries/ThingsBoard/src/RPC_Callback.h:19:7: note: candidate expects 1 argument, 2 provided sketch.ino:119:1: error: 'RPC_Response' does not name a type 119 | RPC_Response processSetLedStatus(const RPC_Data &data) { | ^~~~

Error during build: exit status 1

MannimMond86 commented 3 months ago

it look like the problem of library. This setup works in wokwi: image

MannimMond86 commented 3 months ago

is working. pls add this in the youtube comments. AMAZING HELP WITH THE VIDEO. THX !

MannimMond86 commented 3 months ago

@rch-goldsnaker could you plz upload or share the platform.ini file ? struggles solved with the versions:

Screenshot 2024-07-19 195115_1