Skip to content

Always have to run plugin tests twice on iOS - Failed to load Info.plist from bundle at path #3957

@NickIliev

Description

@NickIliev

From @kspearrin on September 28, 2018 19:19

Tell us about the problem

I have a fairly basic plugin that was generated using the seed template. I have written some tests and can run them successfully on iOS and Android through the included demo app.

However, on iOS I always have to run the test twice for it to work. The first time it always errors with:

npm run ios:test

...

Unable to apply changes on device: B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18. Error is: Command xcrun with arguments simctl install B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18 /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/demo/platforms/ios/build/emulator/demo.app failed with exit code 1. Error output:
 An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/kyle/Library/Developer/CoreSimulator/Devices/B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18/data/Library/Caches/com.apple.mobile.installd.staging/temp.mTKlNf/extracted/Payload/demo.app
Failed to load Info.plist from bundle at path /Users/kyle/Library/Developer/CoreSimulator/Devices/B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18/data/Library/Caches/com.apple.mobile.installd.staging/temp.mTKlNf/extracted/Payload/demo.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
	Failed to load Info.plist from bundle at path /Users/kyle/Library/Developer/CoreSimulator/Devices/B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18/data/Library/Caches/com.apple.mobile.installd.staging/temp.mTKlNf/extracted/Payload/demo.app

I can simply run the same test script again (npm run ios:test), it it works. This happens every single time no matter what I have tried.

Basically, the iOS test command only works every other time it is ran.

This is through the simulator. I have also tried clearing the ./demo/platforms directory, but that didn't seem to change anything.

Which platform(s) does your issue occur on?

iOS

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.2.2
  • Cross-platform modules: 4
  • Runtime(s): 4.2

Please tell us how to recreate the issue in as much detail as possible.

You can download my plugin code here:
https://github.com/bitwarden/mobile/tree/ns2/plugins/bw-crypto

Then run

npm i
npm run ios:test

Observe failure. Then run

npm run ios:test

Observe success.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Full output from terminal:

$ npm run test:ios

> [email protected] test:ios /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/src
> npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch --emulator


> [email protected] tsc /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/src
> tsc


> [email protected] tslint /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/src
> cd .. && tslint "**/*.ts" --config tslint.json --exclude '**/node_modules/**' --exclude 'demo/**/*' --exclude '**/*.d.ts'

Executing before-prepare hook from /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/demo/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.9.2
Preparing project...
Project successfully prepared (ios)
Executing after-prepare hook from /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/demo/hooks/after-prepare/nativescript-unit-test-runner.js
Building project...
Xcode build...
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/UIKit-1V5UHAPTOD24G.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/UIKit-1V5UHAPTOD24G.pcm
note: Linking a static library that was built with -gmodules, but the module cache was not found.  Redistributable static libraries should never be built with module debugging enabled.  The debug experience will be degraded due to incomplete debug information.
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Darwin-38I6DLZ5IH61J.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Darwin-38I6DLZ5IH61J.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Foundation-3DFYNEBRQSXST.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Dispatch-2LX9MWM6UEPQW.pcmwarning: : No such file or directory/Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/UIKit-1V5UHAPTOD24G.pcm: No such file or directory

note: note: while processing while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/Dispatch-2LX9MWM6UEPQW.pcm
/Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/UIKit-1V5UHAPTOD24G.pcm
note: Linking a static library that was built with -gmodules, but the module cache was not found.  Redistributable static libraries should never be built with module debugging enabled.  The debug experience will be degraded due to incomplete debug information.
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/ObjectiveC-1R06XOY9T4FIM.pcm: No such file or directory
warning: note: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Darwin-38I6DLZ5IH61J.pcmwhile processing : /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Y0LVQ9G7OBT/ObjectiveC-1R06XOY9T4FIM.pcmNo such file or directory

note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Darwin-38I6DLZ5IH61J.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Foundation-3DFYNEBRQSXST.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Dispatch-2LX9MWM6UEPQW.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/Dispatch-2LX9MWM6UEPQW.pcm
warning: /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/ObjectiveC-1R06XOY9T4FIM.pcm: No such file or directory
note: while processing /Users/nsbuilduser/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/9G23JDZCI6P8/ObjectiveC-1R06XOY9T4FIM.pcm
note: Using new build systemnote: Planning buildnote: Constructing build description
Project successfully built.
Searching for devices...
28 09 2018 15:10:24.147:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
28 09 2018 15:10:24.152:INFO [launcher]: Launching browser ios with unlimited concurrency
28 09 2018 15:10:24.158:INFO [launcher]: Starting browser NativeScript Unit Test Runner
Executing before-prepare hook from /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/demo/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.9.2
Preparing project...
Project successfully prepared (ios)
Executing after-prepare hook from /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/demo/hooks/after-prepare/nativescript-unit-test-runner.js
Skipping prepare.
Installing...
Unable to apply changes on device: B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18. Error is: Command xcrun with arguments simctl install B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18 /Users/kyle/Projects/bitwarden/mobile-ns/plugins/bw-crypto/demo/platforms/ios/build/emulator/demo.app failed with exit code 1. Error output:
 An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/kyle/Library/Developer/CoreSimulator/Devices/B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18/data/Library/Caches/com.apple.mobile.installd.staging/temp.mTKlNf/extracted/Payload/demo.app
Failed to load Info.plist from bundle at path /Users/kyle/Library/Developer/CoreSimulator/Devices/B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18/data/Library/Caches/com.apple.mobile.installd.staging/temp.mTKlNf/extracted/Payload/demo.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
	Failed to load Info.plist from bundle at path /Users/kyle/Library/Developer/CoreSimulator/Devices/B86F8CBA-19A9-4C80-9CFB-37DCDBEBBA18/data/Library/Caches/com.apple.mobile.installd.staging/temp.mTKlNf/extracted/Payload/demo.app
.

Copied from original issue: NativeScript/NativeScript#6323

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions