Possible Causes
A device in the project has multiple modules with mutual calls, but not all HAPs of the modules are installed to the device.
Solution
Choose Run > Edit Configurations and set the installation method for the HAP file of a specified module. Selecting Keep Application Data will install the application or service in overwrite mode, which retains the application or service cached data.

Reference