samfirm.js
samfirm.js copied to clipboard
TypeError: Cannot read properties of undefined (reading 'BINARY_BYTE_SIZE')
@jesec @luk1337
Input:
samfirm -m SM-N910C -r XEO
Output:
Model: SM-N910C
Region: XEO
Latest version:
PDA: N910CXXU2DVH2
CSC: N910COXA2DVH2
MODEM: N910CXXU2DVH2
C:\Users\x\AppData\Roaming\npm\node_modules\samfirm\dist\index.js:11590
binaryByteSize: parsedInfo.FUSMsg.FUSBody.Put.BINARY_BYTE_SIZE.Data,
^
TypeError: Cannot read properties of undefined (reading 'BINARY_BYTE_SIZE')
at C:\Users\x\AppData\Roaming\npm\node_modules\samfirm\dist\index.js:11590:59
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async main (C:\Users\x\AppData\Roaming\npm\node_modules\samfirm\dist\index.js:11575:135)
Node.js v19.3.0
How to fix it?
It is listed on: https://doc.samsungmobile.com/SM-N910C/XEO/doc.html
Here is the output from https://fota-cloud-dn.ospserver.net/firmware/XEO/SM-N910C/version.xml
<versioninfo>
<url>http://fota-cloud-dn.ospserver.net/firmware/</url>
<firmware>
<model>SM-N910C</model>
<cc>XEO</cc>
<version>
<latest o="6.0.1">N910CXXU2DVH2/N910COXA2DVH2/N910CXXU2DVH2</latest>
<upgrade>
<value rcount="1" fwsize="408659779">N910CXXS2DRI2/N910COXA2DQK1/N910CXXU1DQG1</value>
</upgrade>
</version>
</firmware>
<polling>
<period>7</period>
<time>19</time>
<range>23</range>
</polling>
<ActiveDeviceInfo>
<CycleOfDeviceHeartbeat>0</CycleOfDeviceHeartbeat>
<ServiceURL/>
</ActiveDeviceInfo>
<WiFiConnectedPollingInfo>
<Cycle/>
<Activated>FALSE</Activated>
</WiFiConnectedPollingInfo>
</versioninfo>
This error occurs when the firmware is not yet available in Samsung servers, usually when trying to download it after a few hours/a day it will work just fine. @jesec would be great if a different error message could be shown when BINARY_BYTE_SIZE is null to explain the fw cannot be downloaded yet.