Exactly, my point! The error that I am getting is unrelated to the files that I changed, unrelated to the functionality that I added. Which is all the more confusing.
The answer to this is:
…
Yes, yes I got that the first time only. But the problem is, I did not change the existing .proto
file methods or parameters, I only added a new parameter name “pid”. That’s all. I did not change the dev_eui
, neither did I renamed it, nor I touched any other .proto
files or their definitions.
As I said above, I have only added one parameter to only one .proto
file:
…
Yes, I already did that and I have made necessary changes inside the loraserver code and that is running just fine. I just wanted to reflect this functionality inside the lora-app-server UI
also.
I am sorry, but I am not asking for that. All I am asking is that if you can help me with resolving Uncaught (in promise) Error , that I am getting inside a file I didn’t change and which is completely unrelated to the changes that I made.
:
If it helps, here’s the complete flow of the changes I made:-
-
First, in the
deviceQueue.proto
file added the following line in the messageDeviceQueueItem{}
string pid = 7;
-
Then, in the
device_queue.go
file, insidefunc Enqueue()
, I added the following code snippet:var mac lorawan.EUI64 if err := mac.UnmarshalText([]byte(req.DeviceQueueItem.Pid)); err != nil { return nil, grpc.Errorf(codes.InvalidArgument, "mac: %s", err) } err := d.validator.Validate(ctx, auth.ValidateGatewayAccess(auth.Read, mac)) if err != nil { return nil, grpc.Errorf(codes.Unauthenticated, "authentication failed: %s", err) }
Then inside storage.Transaction()
, I added:
gw, err := storage.GetGateway(ctx, storage.DB(), mac, true)
fmt.Println(gw)
if err != nil {
return nil, helpers.ErrToRPCError(err)
}
-
Then, I preceded to
stores/DeviceQueueStore.js
, and added the following insideenqueue()
function:"device_queue_item.pid": item.mac,
-
Then, in
views/devices/DeviceDetails.js
, insideonSubmit = (queueItem) =>
, added the following:qi.mac= this.props.match.params.mac;
Then, I built the ui
folder using npm start
, and viewed the UI in the development server, where I encountered the Uncaught (in promise) Error, which I want to resolve.