• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Resource Manager Error Codes
2
3> **NOTE**
4>
5> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](../errorcode-universal.md).
6
7## 9001001 Invalid Resource ID
8
9**Error Message**
10
11Invalid resource ID.
12
13**Description**
14
15This error code is reported if the specified resId meets the type requirement but the **resId** does not exist.
16
17**Possible Causes**
18
19The specified **resId** does not exist.
20
21**Solution**
22
231. Check for any of the following cases: [HAR with obfuscation enabled](../../quick-start/har-package.md#building-an-har), intermediate-code HAR, bytecode HAR, and cross-HAP/HSP. In these cases, you are advised to use APIs such as [getStringByName()](js-apis-resource-manager.md#getstringbyname9) to obtain resources by name.
24
252. Check whether the specified **resId** exists.
26
27## 9001002 Matching Resource Not Found Based on the Specified Resource ID
28
29**Error Message**
30
31No matching resource is found based on the resource ID.
32
33**Description**
34
35This error code is reported if the specified **resId** meets the type requirement but no resource is found based on the **resId**.
36
37**Possible Causes**
38
391. The specified **resId** is incorrect.
40
412. An error occurs during resource parsing.
42
43**Solution**
44
45Check whether the specified **resId** is correct.
46
47## 9001003 Invalid Resource Name
48
49**Error Message**
50
51Invalid resource name.
52
53**Description**
54
55This error code is reported if the specified **resName** meets the type requirement but the **resName** does not exist.
56
57**Possible Causes**
58
59The specified **resName** does not exist.
60
61**Solution**
62
63Check whether the specified **resName** is correct.
64
65## 9001004 Matching Resource Not Found Based on the Specified Resource Name
66
67**Error Message**
68
69No matching resource is found based on the resource name.
70
71**Description**
72
73This error code is reported if the specified resId meets the type requirement but no resource is found based on the **resId**.
74
75**Possible Causes**
76
771. The specified **resName** is incorrect.
78
792. An error occurs during resource parsing.
80
81**Solution**
82
83Check whether the specified **resName** is correct.
84
85## 9001005 Invalid Relative Path
86
87**Error Message**
88
89Invalid relative path.
90
91**Description**
92
93This error code is reported if no resource is found based on the specified relative path.
94
95**Possible Causes**
96
97The specified relative path is incorrect.
98
99**Solution**
100
101Check whether the specified relative path is correct.
102
103## 9001006 Cyclic Reference
104
105**Error Message**
106
107The resource is referenced cyclically.
108
109**Description**
110
111This error code is reported if resources are referenced cyclically.
112
113**Possible Causes**
114
115Resources are referenced cyclically.
116
117**Solution**
118
119Check the reference of resource $, and remove the cyclic reference, if any.
120
121## 9001007 Failed to Format the Resource Obtained Based on resId
122
123**Error Message**
124
125Failed to format the resource obtained based on the resource ID.
126
127**Description**
128
129This error code is reported in the case of a failure to format the string resource obtained based on **resId**.
130
131**Possible Causes**
132
1331. The parameter type is not supported.
134
1352. The numbers of parameters and placeholders are inconsistent.
136
1373. The parameter does not match the placeholder type.
138
139**Solution**
140
141Check whether the number and type of **args** parameters are the same as those of placeholders.
142
143## 9001008 Failed to Format the Resource Obtained Based on resName
144
145**Error Message**
146
147Failed to format the resource obtained based on the resource Name.
148
149**Description**
150
151This error code is reported in the case of a failure to format the string resource obtained based on **resName**.
152
153**Possible Causes**
154
1551. The parameter type is not supported.
156
1572. The numbers of parameters and placeholders are inconsistent.
158
1593. The parameter does not match the placeholder type.
160
161**Solution**
162
163Check whether the number and type of **args** parameters are the same as those of placeholders.
164
165## 9001009 Failed to Obtain a ResourceManager Object
166
167**Error Message**
168
169Failed to access the system resource.
170
171**Description**
172
173This error code is reported in the case of a failure to obtain a ResourceManager object.
174
175**Possible Causes**
176
177System resources are not loaded to the sandbox path of the application process.
178
179**Solution**
180
181Check whether the application process contains the sandbox path of system resources.
182
183## 9001010 Invalid Overlay Path
184
185**Error Message**
186
187Invalid overlay path.
188
189**Description**
190
191This error code is reported if the specified overlay path is invalid.
192
193**Possible Causes**
194
195The path does not exist or is not in the installation path of the application.
196
197**Solution**
198
199Check the location of the specified overlay path.
200