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

Login into Meadow Cloud fails, error -4352 #820

Open
sandervandevelde opened this issue Feb 3, 2025 · 4 comments
Open

Login into Meadow Cloud fails, error -4352 #820

sandervandevelde opened this issue Feb 3, 2025 · 4 comments
Assignees
Labels

Comments

@sandervandevelde
Copy link

Describe the bug

I want to connect to the Meadow cloud with the Core model. Device is registered. Settings are set as documented.

This fails.

The logging shows:

[esp] Wifi InvokeEvent NtpUpdateEvent returned CompletedOk
[esp] Wifi InvokeEvent NetworkConnectedEvent returned CompletedOk
[esp] WiFi adapter state changed to: Connected
[application] Interface: wlan0: wlan0 Wireless80211 Up
[application] starting health metrics timer
[application] Meadow.Cloud service will use the Esp32WiFiAdapter network interface
[cloud] Attempting to login to https://www.meadowcloud.co/api/devices/login with {"id":"38-00-2F-00-0D-50-4B-55-30-38-31-20"}...
failed to parse private key -4352
[application] Failed to authenticate with Meadow.Cloud

To Reproduce
Steps to reproduce the behavior:

  1. Run the code seen at https://github.com/sandervandevelde/MeadowCloudProject
  2. check the logging
  3. See error

Expected behavior
I expect the connection is made and the logging of the module arrives in the Meadow cloud

Screenshots

Developer tools (please complete the following information as best as you can):

  • OS and version: Windows 11
  • IDE and version: Visual Studio Community 2022 v17.12.4
  • Meadow extension for IDE version: VS 2022 Tools for Meadow v1.9.9.0

Meadow (please complete the following information as best as you can):
Most of these values can be found by running meadow device info using the Meadow CLI.

  • Meadow hardware version: F7CoreComputeV2
  • Meadow OS version: 2.0.0.3
  • If they are different, please provide these versions as well.
    • Meadow Mono version: ??
    • Meadow coprocessor version: 2.0.0.0

Additional context

I tried to connect to the EventGrid Namespace MQTT broker and provided a private key.

I loaded the latest firmware later on.

Could it be this private key is still available for the code and used here?

Where can I find a list of error codes as this -4352?

How can I remove the private key from the device?

@halyssonJr
Copy link

@sandervandevelde , did you execute those commands?

  • meadow login
  • meadow provision

@sandervandevelde
Copy link
Author

sandervandevelde commented Feb 4, 2025

Yes. Device is provided in the cloud portal and made part of a collection

I did some extra tests by resetting everything and then using the same code as seen in this repo:

meadow firmware download

meadow firmware write

meadow login

meadow port select

meadow cloud collection list

meadow device provision --name MeadowCoreSVE01 --collectionId [id]

No log available in the cloud:

Image

Same 'failed to parse private key -4352' error.

@alexischr
Copy link
Contributor

@sandervandevelde It looks like indeed it is loading a private key from a TLS Client certificate you have previously installed. In order to remove these files, please write empty files to the device to replace them, and reset. Ie. you probably only need to run meadow file write private_key.pem where private_key.pem is an empty file. Please see https://developer.wildernesslabs.co/Meadow/Meadow.OS/TLS_Client_Authentication/ for more info!

@sandervandevelde
Copy link
Author

sandervandevelde commented Feb 4, 2025

I cleared all three files as described in the documentation:

meadow file write -f private_key.pem

meadow file write -f client_cert.pem

meadow file write -f private_key_pass.txt

I stil get the same error:

Image

I even loaded the latest firmware again but still, I get the same flow and error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants