<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nrf Cloud FOTA fail with error code 40000</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113793/nrf-cloud-fota-fail-with-error-code-40000</link><description>Hi 
 I have a issue, I have 4 samples nrf9160 module, all run in same firmware with FOTA feature 
 I found that only one module cannot start FOTA, then I try to read message from UART0 and got below messages: 
 
 00:00:07.627,532] [0m&amp;lt;inf&amp;gt; location: Modem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Aug 2024 22:03:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113793/nrf-cloud-fota-fail-with-error-code-40000" /><item><title>RE: nrf Cloud FOTA fail with error code 40000</title><link>https://devzone.nordicsemi.com/thread/499279?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2024 22:03:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:404356a4-575a-4735-8e61-a484b17caa31</guid><dc:creator>Lincoln Thomas</dc:creator><description>&lt;p&gt;Hi Dannis,&lt;/p&gt;
&lt;p&gt;Digging further, I see the FOTA job execution for this device in our database says the FOTA update completed successfully. Can you see if it&amp;#39;s running your expected new modem firmware version 1.3.6? And was it trying to update the status for the correct &amp;quot;JobId&amp;quot; and &amp;quot;ExecutionId&amp;quot; shown below?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="json"&gt;{
 &amp;quot;JobId&amp;quot;: &amp;quot;f0cfc979-d8eb-47db-b775-0cb97d9dce4f&amp;quot;,
 &amp;quot;DeviceId&amp;quot;: &amp;quot;50345835-3031-4b90-8065-0b0a828d1398&amp;quot;,
 &amp;quot;CreatedAt&amp;quot;: 1721197983272,
 &amp;quot;ExecutionId&amp;quot;: &amp;quot;2f0c02cb-b17e-46d1-9ba2-db425b4f86b0&amp;quot;,
 &amp;quot;JobDocument&amp;quot;: {
  &amp;quot;BundleId&amp;quot;: &amp;quot;APP*be40e218*mfw9160_1.3.6&amp;quot;,
  &amp;quot;FileSize&amp;quot;: 266531,
  &amp;quot;FirmwareType&amp;quot;: 0,
  &amp;quot;Host&amp;quot;: &amp;quot;firmware.nrfcloud.com&amp;quot;,
  &amp;quot;Version&amp;quot;: &amp;quot;mfw9160_1.3.6&amp;quot;
 },
 &amp;quot;LastUpdatedAt&amp;quot;: 1721199187789,
 &amp;quot;Status&amp;quot;: 3,
 &amp;quot;StatusDetail&amp;quot;: &amp;quot;FOTA update completed successfully&amp;quot;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf Cloud FOTA fail with error code 40000</title><link>https://devzone.nordicsemi.com/thread/499119?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2024 20:02:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e11c49c6-e2e3-4ed8-8985-9494f7f75f73</guid><dc:creator>justin</dc:creator><description>[quote userid="79080" url="~/f/nordic-q-a/113793/nrf-cloud-fota-fail-with-error-code-40000"][00:00:19.141,540] [0m&amp;lt;inf&amp;gt; location_sample: Updating FOTA job status...[0m&lt;br /&gt;[00:00:23.138,671] [1;31m&amp;lt;err&amp;gt; nrf_cloud_codec_internal: REST error msg: Job execution does not exist[0m[/quote]
&lt;p&gt;It looks like the device is updating the status of a FOTA&amp;nbsp;job, but the cloud&amp;nbsp;does not know about the job.&lt;br /&gt;The settings module is used to save&amp;nbsp;the info of active FOTA jobs so the status can be reported to the cloud when complete.&lt;br /&gt;If you enable CONFIG_NRF_CLOUD_LOG_LEVEL_DBG you should be able to see the job execution id that the device has saved.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not sure how you your device got into this state... but to fix it, you&amp;nbsp;could&amp;nbsp;reset the settings area that stores the FOTA job information.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct nrf_cloud_settings_fota_job job_inf;

job_inf.validate = NRF_CLOUD_FOTA_VALIDATE_NONE;
job_inf.type = NRF_CLOUD_FOTA_TYPE__INVALID;
job_inf.bl_flags = NRF_CLOUD_FOTA_BL_STATUS_CLEAR;
memset(job_inf.id, 0, NRF_CLOUD_FOTA_JOB_ID_SIZE);

nrf_cloud_fota_settings_save(&amp;amp;job_inf);
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf Cloud FOTA fail with error code 40000</title><link>https://devzone.nordicsemi.com/thread/497908?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 02:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b33db92c-fce1-4fee-9f4c-315c1cfc1281</guid><dc:creator>DannisWong</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;its before FOTA update, and below the UUID of device:&lt;/p&gt;
&lt;h3 class="W9bAi eXUw6"&gt;50345835-3031-4b90-8065-0b0a828d1398&lt;/h3&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;Dannis&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf Cloud FOTA fail with error code 40000</title><link>https://devzone.nordicsemi.com/thread/497813?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 12:30:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb6a75b9-fb81-40ac-b00e-14d5a1694bf8</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Dannis,&amp;nbsp;&lt;/p&gt;
[quote user=""][00:00:23.148,010] [1;31m&amp;lt;err&amp;gt; nrf_cloud_rest: nRF Cloud REST error code: 40000[0m[/quote]
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;nRF&amp;nbsp;Code&lt;/th&gt;
&lt;th&gt;Error&lt;/th&gt;
&lt;th&gt;Reason&lt;/th&gt;
&lt;th&gt;Solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;div&gt;40000&lt;/div&gt;
&lt;/td&gt;
&lt;td valign="top"&gt;Bad request error.&lt;/td&gt;
&lt;td valign="top"&gt;This error could mean many things. Most of the time it means something is not as expected on the cloud like a file was missing or an internal service failed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; NRF_EBADMSG &lt;/span&gt;&lt;span&gt;77&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/**&amp;lt; Bad message */&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Is this the first, last or in the between successful FOTA updates?&amp;nbsp; What application are you running from the SDK?&lt;/p&gt;
&lt;p&gt;Could you please provide more information on DeviceID? We will need to check with the nRF Cloud team to verify FOTA functionality.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>