All Products
Search
Document Center

HTML5 application load failure: NoSuchKey. The specified key does not exsit.

Last Updated: Mar 10, 2021

Symptom

The developer fails to open the HTML5 application after completing the basic access, and the container page displays the error message “NoSuchKey. The specified key does not exist…”, as shown in the following figure.
1

Error example:

  1. <Error>
  2. <Code>NoSuchKey</Code>
  3. <Message>The specified key does not exist.</Message>
  4. <RequestId>5F4DFBE4F1AC943937FBCA6D</RequestId>
  5. <HostId>mcube-prod.oss-cn-hangzhou.aliyuncs.com</HostId>
  6. <Key>A5F87CB301605-beimo/20200024/1.0.0.0_all/nebula/fallback/www/index2.html</Key>
  7. </Error>

Common cause

The direct cause of this type of problem is that the address accessed by the mPaaS Nebula container points to a file, which does not exist on the MDS server. For this reason, the process that triggers the problem is generally as follows. The client tries to access a resource that does not exist in an offline package. The client misses locally, and the online fallback address also misses. So the MDS server returns this error.

Troubleshooting procedure

Based on the cause analysis, the troubleshooting method is described as follows:

  1. Whether the page address of the H5 app opened by the client is correct.
  2. Whether the related resources in the offline package are packaged correctly.

Confirm that the address of the page opened by the H5 app is correct.

There are three types of situations:

  1. Actively open the H5 app and confirm whether the input URL parameter is correct.
    3
    2

  2. According to the logic of the H5 app page redirection, confirm whether the opened page address is correct, including the target URL setting of the redirection form such as pushWindow() and location.href.

  3. When uploading the offline package, developers must configure the default entry URL of the H5 app. Problem may occur: If the URL is not configured or the configured entry URL is incorrect, the container cannot provide the correct page address when opening the H5 app.
    4
  1. Download the .amr file on the console, modify the suffix to .zip and decompress it. Unzip the .tar file in the folder, and then you can see the resource files in the offline package.
    5
    6
    Then confirm whether the page resource file to be opened is contained in this folder.

  2. Confirm whether the environment configuration of current app is consistent with the environment of current offline package.
    Check the App ID in meta.config in the app project:
    7
    Check the App ID on the console where the target H5 app offline package is located:
    8