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

Provisioning error at 1st time #7

Open
matsujirushi opened this issue Sep 2, 2019 · 3 comments
Open

Provisioning error at 1st time #7

matsujirushi opened this issue Sep 2, 2019 · 3 comments

Comments

@matsujirushi
Copy link
Contributor

PnP sample code 'iotc_devkit' got error at 1st time.

Wi-Fi aterm-3b8988-g connected.
Now is (UTC): Mon Sep  2 07:00:48 2019

Error: Time:Mon Sep  2 07:00:55 2019 File:prov_device_ll_client.c Func:prov_transport_process_json_reply Line:654 Provisioning Failure: OperationId: 4.73a3be01e955831e.6d9b7dcf-7d5e-4ba8-9553-49528976d320 - Date: 2019-09-02T07:00:54.3130834Z - Msg: Custom allocation failed with status code: 404
Error: Time:Mon Sep  2 07:00:55 2019 File:prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:1014 Unable to process registration reply.
Error: Time:Mon Sep  2 07:00:55 2019 File:prov_device_ll_client.c Func:on_transport_registration_data Line:766 Failure retrieving data from the provisioning service
Error: Time:Mon Sep  2 07:00:55 2019 File:main.ino Func:provisioningRegisterCallback Line:146 DPS Provisioning callback called with error state 7
Error: Time:Mon Sep  2 07:00:55 2019 File:main.ino Func:registerDevice Line:227 Error registering device for DPS

What's mean 'Custom allocation failed with status code: 404' ?
How to fix that ?

@JerryYangKai
Copy link
Contributor

Hi @matsujirushi , can you tell me more about your problem? Something like where did you get your deviceId and scopeId. Thanks.

@matsujirushi
Copy link
Contributor Author

Device ID and Scope ID is fine.
(Error occured at 1st time only. 2nd time, error not occured.)

@JerryYangKai
Copy link
Contributor

@matsujirushi Hi, I finally repro your issue, under a special condition. The sample code run correctly when I use registered device or create a new device. However, I deleted my application and create a new one, then I can see the error log in serial monitor. It seems that register is failed in the first time and succeed in second retry.

Error: Time:Mon Sep 30 07:15:11 2019 File:prov_device_ll_client.c Func:prov_transport_process_json_reply Line:654 Provisioning Failure: OperationId: 4.e06ca595c6bde676.efaf2e64-46d7-4df1-83c1-6544be63dbd6 - Date: 2019-09-30T07:15:10.3408181Z - Msg: Custom allocation failed with status code: 404
Error: Time:Mon Sep 30 07:15:11 2019 File:prov_transport_mqtt_common.c Func:prov_transport_common_mqtt_dowork Line:1014 Unable to process registration reply.
Error: Time:Mon Sep 30 07:15:11 2019 File:prov_device_ll_client.c Func:on_transport_registration_data Line:766 Failure retrieving data from the provisioning service
Error: Time:Mon Sep 30 07:15:11 2019 File:main.ino Func:provisioningRegisterCallback Line:146 DPS Provisioning callback called with error state 7
Error: Time:Mon Sep 30 07:15:11 2019 File:main.ino Func:registerDevice Line:227 Error registering device for DPS
Info: Provisioning callback indicates success.  iothubUri=iotc-7269ffd0-6aff-45bd-bf5a-ed9717990ccb.azure-devices.net, deviceId=mynodedevice
Info: DPS successfully registered.  Continuing on to creation of IoTHub device client handle.

I guess that the iot central application needs some time to deploy when it has been just created. So error occurred at first time then it turned OK.

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

No branches or pull requests

2 participants