GithubHelp home page GithubHelp logo

meteor / cordova-plugin-meteor-webapp Goto Github PK

View Code? Open in Web Editor NEW
66.0 32.0 74.0 8.98 MB

Cordova plugin that serves a Meteor web app through a local server and implements hot code push

License: MIT License

JavaScript 38.07% Swift 27.43% Objective-C 7.38% Java 27.12%
meteor meteorjs hacktoberfest ios android cordova

cordova-plugin-meteor-webapp's Introduction

Meteor WebApp Cordova plugin

Cordova apps don’t load web content over the network, but rely on locally stored HTML, CSS, JavaScript code and other assets.

This repository has been merged into Meteor main repository. You can find it there under npm-packages.

Plain Cordova uses file:// URLs to serve assets from the app bundle, but this has some drawbacks:

  • We need the ability to reliably switch over to new versions of the app
  • file:// triggers some non-standard browser behaviors and bugs
  • We want to serve index.html when a file is not found, to better support client-side routing
  • We need to respect the URL-path mappings from the manifest

The Meteor Cordova integration therefore uses a plugin to serve assets from the local filesystem and to support hot code push.

The old version of the plugin has some problems:

  • It controls the download of assets from JavaScript using the Cordova file transfer plugin, which has performance issues and isn’t very reliable
  • It redownloads all assets on every update
  • It doesn’t validate the assets it downloads, often leaving versions in an inconsistent state (that happens if the server updates while we are downloading for instance)
  • It has no way to recover from a faulty downloaded version, which means the only way to get the app working again is to remove it from the device
  • On iOS, it intercepts URL loading using NSURLProtocol, which is not supported on WKWebView (and also doesn’t support streaming video).

The goals of the plugin rewrite are to improve performance and reliability, to ensure compatibility with WKWebView, and to fix some other issues in the process.

The new design has two major parts:

Switching to a real embedded web server (iOS only)

Instead of using a URL loading interception mechanism, we now use an embedded web server. Besides compatibility with WKWebView, this allows us to more closely replicate the behavior of webapp_server.js. We respect the URL mappings in the asset manifest and set the appropriate headers for caching and source map support for instance.

This should give us very efficient reloading, because assets marked as cacheable in the manifest (which get served with a long max-age) should not have to be re-requested from the local web server at all. Other files can still use conditional requests and often result in a 304 Not Modified response because we set the ETag header to the asset hash. However, it turns out browsers (as well as the web view) don’t respect max-age when window.location.reload() is used, and always perform at least a conditional request. The tweak required is to use window.location.replace(window.location.href) instead, which seems to have no adverse consequences.

Assigning a port for the local web server

The local web server needs a port to bind to, and we can’t simply use a fixed port because that might lead to conflicts when running multiple Meteor Cordova apps on the same device.

Initially, the easiest solution seemed to be to let the OS assign a randomized port in the ephemeral port range (49152–65535). This works, but has a serious drawback: if the port changes each time you run the app, web features that depend on the origin (like caching, localStorage, IndexedDB) won’t persist between runs.

So instead we now pick a port from a predetermined range (12000-13000), calculated based on the appId. That ensures the same app will always use the same port, but it hopefully avoids collisions betweens apps as much as possible.

There is still a theoretical possibility of the selected port being in use. Currently, starting the local server will fail in that case.

Moving downloading updates to native code

Coordinating the download of files from JavaScript isn’t ideal, because calls over the JavaScript-native bridge are expensive and block the main thread. In addition, the Cordova file transfer plugin for iOS is based on an older networking mechanism (NSURLConnection) that has some efficiency issues of itself. As a result, downloads often fail, and the way this is dealt with in the existing code is to try again after a 30 second timeout. Therefore, downloads are very unpredictable and can sometimes take minutes even on a local network.

The new plugin moves downloads to native code. The JavaScript code is only responsible for detecting new versions (by subscribing to meteor_autoupdate_clientVersions, the normal autoupdating behavior) and notifying the plugin (using WebAppLocalServer.checkForUpdates()). Besides avoiding a series of calls from JavaScript, this gives us more control over downloading mechanism. On iOS, we can now use NSURLSession, which allows for more customization and efficiently supports parallel downloads without blocking (it also supports SPDY and HTTP/2, which could make this even more efficient in the future).

Originally, we were hoping to take advantage of NSURLSessions support for background file transfers, which allows downloads to continue even if the app is not active. But it turns out these out of process transfers are much slower when downloading small files (in one test, 600ms vs 6000ms), so especially during development that would make updates unnecessarily slow. Instead, we're now creating a background task so downloads get to continue for another 3 minutes after the app goes into the background. That should be enough in most cases, but resuming is also pretty efficient (see below), so it doesn't seem not having real background transfers is a big loss.

The downloading design is based on two important principles:

  • We should make sure we always end up with a valid asset bundle, even if downloads take a while or are resumed later
  • We should not download or copy files unnecessarily

Storing and serving asset bundles

The initial asset bundle is stored as part of the app bundle, in a read-only location. Downloaded asset bundles are stored in a writeable part of the file system (Library/NoCloud/meteor on iOS), with one subdirectory per version. Versions are cleaned up when they are no longer needed, so most of the time there should be only one version, but cleanup only happens after a successful startup (we wait until then so we can revert to a last known good version if startup isn’t successful, see below).

The local web server serves files both from the www directory in the app bundle (for Cordova files, including files that are part of plugins) and from the currentAssetBundle. An AssetBundle creates Assets based on the entries in an AssetManifest (for entries that also specify a source map, a separate asset is created). It knows which assets correspond to which URL path, and it also knows its indexFile.

We never switch the currentAssetBundle immediately, because that would mean the app could have loaded some files from the old version and now loads others from the new one. Instead, we keep a pendingAssetBundle and switch over when a reload occurs (Cordova plugins get a call to their onReset method when this happens). Reloads are under control of the reload package as usual, so they respects the result of Meteor._reload.onMigrate() callbacks for instance. So especially with reload-on-resume, it may be a while before the switch happens.

With a freshly installed app, the currentAssetBundle will be initialized to the initialAssetBundle. For apps that have already downloaded updates, lastDownloadedVersion will be set (as a persistent configuration value, NSUserDefaults on iOS) and we use that to locate the appropriate downloaded asset bundle and make it current instead.

Downloading updates

  • When checking for updates, we first download the asset manifest. Then:
    • If we’re already serving that version or if it is pending, do nothing (this could happen if we invoke checkForUpdates() manually, or on startup)
    • If we have an existing downloaded version, use that (this could only happen if we revert to a version that we downloaded before but aren’t currently serving or have set as pending)
    • Else, we create a new asset bundle from the asset manifest and point it to a fresh Downloading directory. Then:
      • For every asset in the bundle, based on the URL path and hash, we try to find an existing file:
        • For the initial bundle, which as part of the app bundle is read-only, we just use the existing file path (an alternative would be to copy it, but we’d like to avoid that).
        • Even though downloaded bundles are writeable, we can’t move files because we are likely still serving from that version. And we’d like to avoid copying because of the performance implications, so hard links offer a really nice solution here. Hard links have the advantage that they make the file system responsible for keeping track of what files are in use by what version. When we remove a version directory, all files that are not in use by other versions will be removed automatically, but the ones that are shared won’t.
    • Before the above, if there is an existing Downloading directory, we rename it to PartialDownload and take the assets already downloaded into account when trying to find existing files (again, based on the URL path and the hash).
    • We then download just the missing assets, checking every asset against the hash in the manifest to make sure we downloaded the right version (see below)
    • Once we have a complete new version, we rename Downloading to a directory name based on its version, we make it the pendingAssetBundle, and we invoke the onNewVersionReady() callback (this callback is normally handled as part of the autoupdating package and calls into the reload package).

Resuming downloads follows naturally from this model. We always download the asset manifest first (because there may be a newer version available since the last time we started the app), and use that to decide what files we can reuse and which ones we still need to download. So even if the version in PartialDownload is different from the one we are Downloading now, we never download files twice. We remove PartialDownload after initializing the downloading asset bundle.

Because the app on the server may be updated at any time, it is not guaranteed the files we download are all from the same version. Especially on slower mobile connections, there may be a delay between individual file downloads. To check whether the file we receive is the one we expected, we check against the hash in the manifest. One option would be to calculate the SHA1 of the file locally, but this could slow updates down, especially with larger files and older devices. What we’ve done now is to make the server set the ETag header to the hash, so we can simply compare the header value in the response against the manifest (it only does this if the ETag value matches the format of a SHA1 hash).

When the app is updated on the App Store (which we detect by checking lastSeenInitialVersion), we remove the entire versions directory and clear lastDownloadedVersion and lastKnownGoodVersion. This ensures we will use the new initial asset bundle and avoids problems with downloaded versions (because these may depend on files in the old initial asset bundle).

Recovering from faulty versions

As mentioned, a major problem of the old plugin is that faulty versions may require a reinstall of the app.

To counteract this, we invoke WebAppLocalServer.startupDidComplete() after a successful startup. Currently, we only invoke this after all Meteor.startup() callbacks have been invoked, which seems like a safe point.

If startupDidComplete() is not invoked within a certain time period, we consider the version faulty and will rollback to an earlier version. Alternatively, we may be able to detect faulty versions faster by hooking into window.onError, but I’m not sure if that won’t generate false alarms.

We roll back to the initialAssetBundle, or lastKnownGoodVersion if it has been set. Receiving startupDidComplete() sets lastKnownGoodVersion and also cleans up the downloaded asset bundles.

A problem with this recovery mechanism is that unless the server has been updated, the server will hot code push the faulty version again. Therefore we blacklist faulty versions on the device so we know not to retry.

cordova-plugin-meteor-webapp's People

Contributors

abernix avatar awwx avatar benjamn avatar dependabot[bot] avatar filipenevola avatar hwillson avatar jackkav avatar macrozone avatar martijnwalraven avatar mslobodan avatar nauzer avatar oleksandrchekhovskyi avatar realhandy avatar renanccastro avatar rj-david avatar storytellercz avatar wojtkowiak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-meteor-webapp's Issues

meteor run ios not working

I am getting following error when i run command meteor run ios I am using plugin version 1.4.1.

Its working fine if i run command meteor run ios-device but not with meteor run ios

=> Started your app.                          
                                              
=> App running at: http://localhost:3000/     
=> Errors executing Cordova commands:         
                                              
   While running Cordova app for platform iOS with options --emulator:
   Error: Command failed: /Users/i-verve/Desktop/TracyApp Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/cordova/run --emulator
   2017-08-31 16:22:30.514 xcodebuild[4606:99239] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path
   '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin' not present in DVTPlugInCompatibilityUUIDs
   2017-08-31 16:22:30.593 xcodebuild[4606:99239] Failed to load plugin at: /Users/i-verve/Library/Application
   Support/Developer/Shared/Xcode/Plug-ins/Unity4XC.xcplugin, skipping.  Reason for failure: *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt
   to insert nil object from objects[0]
   ** BUILD FAILED **
   
   
   The following build commands failed:
   CompileSwift normal x86_64 /Users/i-verve/Desktop/TracyApp
   Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/Tracy/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift
   CompileSwift normal x86_64 /Users/i-verve/Desktop/TracyApp
   Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/Tracy/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift
   CompileSwift normal x86_64 /Users/i-verve/Desktop/TracyApp
   Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/Tracy/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift
   CompileSwift normal x86_64 /Users/i-verve/Desktop/TracyApp
   Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/Tracy/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift
   CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
   (5 failures)
   Error code 65 for command: xcodebuild with args: -xcconfig,/Users/i-verve/Desktop/TracyApp
   Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/cordova/build-debug.xcconfig,-project,Tracy.xcodeproj,-target,Tracy,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS
   Simulator,build,CONFIGURATION_BUILD_DIR=/Users/i-verve/Desktop/TracyApp
   Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/i-verve/Desktop/TracyApp
   Resort/TracyApp/tracy_front/tracyapp/.meteor/local/cordova-build/platforms/ios/build/sharedpch
   at ChildProcess.exitCallback (/tools/utils/processes.js:151:23)
   at emitTwo (events.js:87:13)
   at ChildProcess.emit (events.js:172:7)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
   => awaited here:
   at Function.Promise.await
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:35:12)
   at CordovaProject.runCommands (/tools/cordova/project.js:715:22)
   at CordovaProject.run$ (/tools/cordova/project.js:261:10)
   at tryCatch
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:63:40)
   at GeneratorFunctionPrototype.invoke [as _invoke]
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:337:22)
   at GeneratorFunctionPrototype.prototype.(anonymous function) [as next]
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:96:21)
   at tryCatch
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:63:40)
   at invoke
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:139:20)
   at
   /Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:184:11
   at callInvokeWithMethodAndArg
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:183:16)
   at AsyncIterator.enqueue
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:206:13)
   at AsyncIterator.prototype.(anonymous function) [as next]
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:96:21)
   at Object.runtime.async
   (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/regenerator-runtime/runtime.js:226:14)
   at
   /Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:32:39

/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^
undefined
 => awaited here:
    at Function.Promise.await (/Users/i-verve/.meteor/packages/meteor-tool/.1.4.2_3.1rd9djy++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:35:12)
    at /tools/cordova/runner.js:98:17
    at /tools/utils/buildmessage.js:271:13
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:264:29
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:262:18
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
    at /tools/utils/buildmessage.js:253:23
    at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
    at Object.capture (/tools/utils/buildmessage.js:252:19)
    at CordovaRunner.startRunTargets (/tools/cordova/runner.js:97:37)
    at AppRunner._runOnce (/tools/runners/run-app.js:763:21)
    at AppRunner._fiber (/tools/runners/run-app.js:876:28)
    at /tools/runners/run-app.js:403:12

Swift 2.3 / xCode 8

Some on the plugin's I am using still require Swift 2.3, their is the option to "use Legacy swift Language Version" - "YES" but I still get warnings with NSURL needing to use ! or ? and "Ambiguous use of 'dispatch_sync' (_:Block)

Seems like this should have been resolved a few versions back.

Failed to install 'cordova-plugin-meteor-webapp': Error: ENOENT: no such file or directory, open 'path/to/Bridging-Header.h'

this is the same as #6

but because this issue has been closed, i reopen it as the fix proposed there is just a workaround that is not applicable in every case.

i need to do rm -rf .meteor/local/cordova-build/ before cordova build. otherwise the build will fail with the error Failed to install 'cordova-plugin-meteor-webapp': Error: ENOENT: no such file or directory, open 'path/to/Bridging-Header.h'

BoringSSL errors

I'm getting a strange problem that's causing a brief Iron Router error page to be displayed on app startup on the first run of the app. (Yes, I know I should move off of Iron Router, but I have to support this codebase for the time being.)

Here's what I'm seeing in the XCode console on startup.

2018-08-16 07:06:50.967934-0700 Booknodes[2422:466905] Start downloading asset manifest from: manifest.json -- https://m.booknodes.com/__cordova/
2018-08-16 07:06:51.301251-0700 Booknodes[2422:466990] [BoringSSL] boringssl_session_errorlog(224) [C1.1:2][0x101e1e9d0] [boringssl_session_read] SSL_ERROR_SSL(1): operation failed within the library
2018-08-16 07:06:51.301325-0700 Booknodes[2422:466990] [BoringSSL] boringssl_session_handshake_error_print(205) [C1.1:2][0x101e1e9d0] 4345586680:error:100000d7:SSL routines:OPENSSL_internal:SSL_HANDSHAKE_FAILURE:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-109.200.32/ssl/ssl_lib.cc:1081:

The last two messages are repeated many times, then I get:

2018-08-16 07:06:51.403383-0700 Booknodes[2422:467041] Downloaded asset manifest for version: 7943870ddfcaa74bed0fae8bbdf0fd3423cb66ff
2018-08-16 07:06:51.429145-0700 Booknodes[2422:466990] Start downloading assets from bundle with version: 7943870ddfcaa74bed0fae8bbdf0fd3423cb66ff
2018-08-16 07:06:51.643634-0700 Booknodes[2422:467041] [BoringSSL] boringssl_session_errorlog(224) [C2.1:2][0x1030663d0] [boringssl_session_read] SSL_ERROR_SSL(1): operation failed within the library
2018-08-16 07:06:51.643733-0700 Booknodes[2422:467041] [BoringSSL] boringssl_session_handshake_error_print(205) [C2.1:2][0x1030663d0] 4345351880:error:100000d7:SSL routines:OPENSSL_internal:SSL_HANDSHAKE_FAILURE:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl/boringssl-109.200.32/ssl/ssl_lib.cc:1081:

Those last two SSL errors keep repeating for a while. Then I get an Iron Router error page for a moment, then:

2018-08-16 07:06:56.961614-0700 Booknodes[2422:466989] [CDVTimer][assetBundleDownload] 5532.022953ms
2018-08-16 07:06:56.962179-0700 Booknodes[2422:466995] Finished downloading new asset bundle version: 7943870ddfcaa74bed0fae8bbdf0fd3423cb66ff
2018-08-16 07:06:56.976568-0700 Booknodes[2422:466905] Serving asset bundle version: 7943870ddfcaa74bed0fae8bbdf0fd3423cb66ff

And all is fine.

I can't have an error screen popping up for first time users. Any idea what could be causing this?

Crash on boot with "Couldn't load runtime config from index file"

I'm attempting to upgrade from from Meteor 1.5 to 1.6.1 (I need the latest version of cordova-android). Currently using Meteor 1.6.1-beta.11.

App is hanging at splash screen on startup. Obvious error I'm seeing is this: 2017-11-30 16:58:18.036069-0800 dev[1101:404950] Couldn't load runtime config from index file.

Full logs from Xcode below. How can I help troubleshoot this?

2017-11-30 16:58:17.789588-0800 dev[1101:404950] Apache Cordova native platform version 4.5.3 is starting.
2017-11-30 16:58:17.789932-0800 dev[1101:404950] Multi-tasking -> Device: YES, App: YES
2017-11-30 16:58:17.804525-0800 dev[1101:404950] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2017-11-30 16:58:17.962940-0800 dev[1101:404950] [MC] Lazy loading NSBundle MobileCoreServices.framework
2017-11-30 16:58:17.964594-0800 dev[1101:404950] [MC] Loaded MobileCoreServices.framework
2017-11-30 16:58:17.968551-0800 dev[1101:404950] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2017-11-30 16:58:17.998375-0800 dev[1101:404950] CDVWKWebViewEngine will reload WKWebView if required on resume
2017-11-30 16:58:17.998480-0800 dev[1101:404950] Using WKWebView
2017-11-30 16:58:17.999414-0800 dev[1101:404950] [CDVTimer][console] 0.223994ms
2017-11-30 16:58:17.999824-0800 dev[1101:404950] [CDVTimer][handleopenurl] 0.285029ms
2017-11-30 16:58:18.003796-0800 dev[1101:404950] [CDVTimer][intentandnavigationfilter] 3.881991ms
2017-11-30 16:58:18.004046-0800 dev[1101:404950] [CDVTimer][gesturehandler] 0.150025ms
2017-11-30 16:58:18.036069-0800 dev[1101:404950] Couldn't load runtime config from index file: Couldn't load runtime config from index file
2017-11-30 16:58:18.037887-0800 dev[1101:404950] Serving asset bundle version: fc5c525ba9ad9e1b9a9fcc3f09211dce8d72a412
[INFO] GCDWebServer started on port 12104 and reachable at http://localhost:12104/
2017-11-30 16:58:18.041294-0800 dev[1101:404950] [CDVTimer][webapplocalserver] 37.114978ms
2017-11-30 16:58:18.051991-0800 dev[1101:404950] [CDVTimer][statusbar] 10.537982ms
2017-11-30 16:58:18.123596-0800 dev[1101:404950] [CDVTimer][splashscreen] 71.482956ms
2017-11-30 16:58:18.127387-0800 dev[1101:404950] [CDVTimer][file] 3.620982ms
2017-11-30 16:58:18.127653-0800 dev[1101:404950] [CDVTimer][privacyscreenplugin] 0.171959ms
2017-11-30 16:58:18.127805-0800 dev[1101:404950] [CDVTimer][TotalPluginStartup] 128.715038ms
2017-11-30 16:58:18.140259-0800 dev[1101:404950] createNotificationChecker
2017-11-30 16:58:18.140332-0800 dev[1101:404950] not coldstart
2017-11-30 16:58:18.165401-0800 dev[1101:404950] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2017-11-30 16:58:18.168063-0800 dev[1101:404950] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service
2017-11-30 16:58:18.197747-0800 dev[1101:404950] refreshPreferences: HangTracerEnabled: 0
2017-11-30 16:58:18.208626-0800 dev[1101:404950] refreshPreferences: HangTracerDuration: 500
2017-11-30 16:58:18.240375-0800 dev[1101:404950] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0
2017-11-30 16:58:18.258847-0800 dev[1101:404950] active
2017-11-30 16:58:18.260620-0800 dev[1101:404950] PushPlugin skip clear badge
2017-11-30 16:58:38.353791-0800 dev[1101:405193] App startup timed out, reverting to last known good version

ENOENT, no such file or directory Bridging-Header.h

Hi!

I get this issue when trying to compile my Meteor 1.3 app.

% Failed to install 'cordova-plugin-meteor-webapp':Error: ENOENT, no such file or directory '/Users/lpender/dev/mine/flare/.meteor/local/cordova-build/platforms/ios/Flare/Bridging-Header.h'
  at Object.fs.openSync (fs.js:439:18)
  at Object.fs.readFileSync (fs.js:290:15)
  at module.exports (/Users/lpender/dev/mine/flare/.meteor/local/cordova-build/plugins/cordova-plugin-meteor-webapp/scripts/iosAddBridgingHeader.js:21:17)
  at runScriptViaModuleLoader (/Users/lpender/.meteor/packages/meteor-tool/.1.3.2_4.103hozl++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/hooks/HooksRunner.js:167:18)
  at runScript (/Users/lpender/.meteor/packages/meteor-tool/.1.3.2_4.103hozl++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:816:30)
  at Promise.promise.promiseDispatch (/Users/lpender/.meteor/packages/meteor-tool/.1.3.2_4.103hozl++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:749:13)
  at /Users/lpender/.meteor/packages/meteor-tool/.1.3.2_4.103hozl++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:810:14
  at flush (/Users/lpender/.meteor/packages/meteor-tool/.1.3.2_4.103hozl++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/q/q.js:108:17)
  at process._tickCallback (node.js:458:13)

Any ideas?

Thanks

iOS HCP fails due to trying to download the same file twice from two different directories

I debugged the code to understand this problem: meteor/meteor#10181. I hope this will help with a speedy resolution of this iOS HCP problem.

Here's what's happening. For whatever reason, this code tries to link the same file twice -- once from urlPath /images/ and a second, fatal time from urlPath /__cordova/images/.

if let cachedAsset = cachedAssetForAsset(asset) {
do {
try fileManager.linkItem(at: cachedAsset.fileURL as URL, to: asset.fileURL as URL)
} catch {
self.didFailWithError(WebAppError.fileSystemFailure(reason: "Could not link to cached asset", underlyingError: error))
return
}

The result is the error message mentioned in meteor/meteor#10181.

Here's console logging of the error from my test, in which I added SNLog lines to capture the cachedAsset.fileURL, the asset.fileURL, and the asset.urlPath. You can see that in the problematic 2nd call, the urlPath contains /__cordova/images/, but the target URL is the same both times.

2018-08-27 17:14:27.932927-0400 Vium[5670:738333] cachedAsset.fileURL = file:///var/mobile/Containers/Data/Application/8BF946D1-3D34-4C96-BF63-98EF3A515C9B/Library/NoCloud/meteor/PartialDownload/app/images/circle_green.png
2018-08-27 17:14:27.958018-0400 Vium[5670:738333] asset.fileURL = file:///var/mobile/Containers/Data/Application/8BF946D1-3D34-4C96-BF63-98EF3A515C9B/Library/NoCloud/meteor/Downloading/app/images/circle_green.png
2018-08-27 17:14:27.966811-0400 Vium[5670:738333] asset.urlPath = /images/circle_green.png
        --- immediately tries a 2nd time with a different urlPath ---
2018-08-27 17:14:27.974137-0400 Vium[5670:738333] cachedAsset.fileURL = file:///var/mobile/Containers/Data/Application/8BF946D1-3D34-4C96-BF63-98EF3A515C9B/Library/NoCloud/meteor/PartialDownload/app/images/circle_green.png
2018-08-27 17:14:27.975626-0400 Vium[5670:738333] asset.fileURL = file:///var/mobile/Containers/Data/Application/8BF946D1-3D34-4C96-BF63-98EF3A515C9B/Library/NoCloud/meteor/Downloading/app/images/circle_green.png
2018-08-27 17:14:27.976786-0400 Vium[5670:738333] asset.urlPath = /__cordova/images/circle_green.png
        --- and then the error occurs ---
2018-08-27 17:14:32.905900-0400 Vium[5670:738333] Download failure: Could not link to cached asset: Error Domain=NSCocoaErrorDomain Code=516 "“circle_green.png” couldn’t be linked to “images” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/var/mobile/Containers/Data/Application/8BF946D1-3D34-4C96-BF63-98EF3A515C9B/Library/NoCloud/meteor/PartialDownload/app/images/circle_green.png, NSUserStringVariant=(
    Link
), NSDestinationFilePath=/var/mobile/Containers/Data/Application/8BF946D1-3D34-4C96-BF63-98EF3A515C9B/Library/NoCloud/meteor/Downloading/app/images/circle_green.png, NSFilePath=/var/mobile/Containers/Data/Application/8BF946D1-3D34-4C96-BF63-98EF3A515C9B/Library/NoCloud/meteor/PartialDownload/app/images/circle_green.png, NSUnderlyingError=0x1c425e510 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}
2018-08-27 17:14:32.989153-0400 Vium[5670:738172] ERROR: {"line":36,"column":30,"sourceURL":"http://localhost:12072/plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js"}

Cordova/CDV.h not found. Cannot compile IOS.

Reproduce

mkdir iosbug; cd iosbug
meteor create clean_app
cd clean_app
meteor npm i
meteor add-platform ios
meteor build ../dist --server example.com:443
cd ../dist/ios/project
xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO

Result

** BUILD FAILED **


The following build commands failed:
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(5 failures)

Platform

  • compiling for IOS on OSX 10.13.6
  • similar results for XCode versions from 7.xx to 9.4.1
  • fails in xcode or with xcodebuild

Detail

[...]

CompileXIB clean_app/Classes/MainViewController.xib
    cd /Users/admin/src/iosbug/dist/ios/project
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/Users/admin/bin:/Users/admin/.nvm/versions/node/v8.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin]:/usr/local/Caskroom/android-sdk/4333796/tools:/usr/local/Caskroom/android-sdk/4333796/platform-tools"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module clean_app --output-partial-info-plist /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/MainViewController-PartialInfo.plist --auto-activate-custom-fonts --target-device iphone --target-device ipad --minimum-deployment-target 9.0 --output-format human-readable-text --compile /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/clean_app.app/MainViewController.nib /Users/admin/src/iosbug/dist/ios/project/clean_app/Classes/MainViewController.xib

ProcessInfoPlistFile build/Release-iphoneos/clean_app.app/Info.plist clean_app/clean_app-Info.plist
    cd /Users/admin/src/iosbug/dist/ios/project
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/Users/admin/bin:/Users/admin/.nvm/versions/node/v8.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin]:/usr/local/Caskroom/android-sdk/4333796/tools:/usr/local/Caskroom/android-sdk/4333796/platform-tools"
    builtin-infoPlistUtility /Users/admin/src/iosbug/dist/ios/project/clean_app/clean_app-Info.plist -genpkginfo /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/clean_app.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -additionalcontentfile /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/MainViewController-PartialInfo.plist -additionalcontentfile /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/CDVLaunchScreen-SBPartialInfo.plist -additionalcontentfile /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/assetcatalog_generated_info.plist -o /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/clean_app.app/Info.plist

LinkStoryboards
    cd /Users/admin/src/iosbug/dist/ios/project
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/Users/admin/bin:/Users/admin/.nvm/versions/node/v8.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin]:/usr/local/Caskroom/android-sdk/4333796/tools:/usr/local/Caskroom/android-sdk/4333796/platform-tools"
    export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
    /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module clean_app --target-device iphone --target-device ipad --minimum-deployment-target 9.0 --output-format human-readable-text --link /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/clean_app.app /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/CDVLaunchScreen.storyboardc

CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
    cd /Users/admin/src/iosbug/dist/ios/project
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/Users/admin/bin:/Users/admin/.nvm/versions/node/v8.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin]:/usr/local/Caskroom/android-sdk/4333796/tools:/usr/local/Caskroom/android-sdk/4333796/platform-tools"
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name clean_app -O -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -target arm64-apple-ios9.0 -g -Xfrontend -serialize-debugging-options -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -c -j4 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -output-file-map /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/clean_app-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/clean_app.swiftmodule -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/clean_app-Swift.h -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project

CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift
    cd /Users/admin/src/iosbug/dist/ios/project
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.o
/Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h:28:9: error: 'Cordova/CDV.h' file not found
#import <Cordova/CDV.h>
        ^
0  swift                    0x000000010e89866b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x000000010e897956 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x000000010e898ccf SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff6213ff5a _sigtramp + 26
4  libsystem_platform.dylib 0x000000000000000d _sigtramp + 2649489613
5  swift                    0x000000010cab3737 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 151
6  swift                    0x000000010cab3802 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 354
7  swift                    0x000000010cab444c swift::ClangImporter::Implementation::importHeader(swift::ModuleDecl*, llvm::StringRef, swift::SourceLoc, bool, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >) + 1468
8  swift                    0x000000010cab4bc6 swift::ClangImporter::importBridgingHeader(llvm::StringRef, swift::ModuleDecl*, swift::SourceLoc, bool) + 502
9  swift                    0x000000010caa4f2d swift::CompilerInstance::performSema() + 605
10 swift                    0x000000010c5e8596 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 934
11 swift                    0x000000010c5e768d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
12 swift                    0x000000010c5e30ac main + 1932
13 libdyld.dylib            0x00007fff61e31015 start + 1
Stack dump:
0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppLocalServer.o 

CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift
    cd /Users/admin/src/iosbug/dist/ios/project
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.o
/Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h:28:9: error: 'Cordova/CDV.h' file not found
#import <Cordova/CDV.h>
        ^
0  swift                    0x000000010dbc266b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x000000010dbc1956 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x000000010dbc2ccf SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff6213ff5a _sigtramp + 26
4  libsystem_platform.dylib 0x000000000000000d _sigtramp + 2649489613
5  swift                    0x000000010bddd737 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 151
6  swift                    0x000000010bddd802 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 354
7  swift                    0x000000010bdde44c swift::ClangImporter::Implementation::importHeader(swift::ModuleDecl*, llvm::StringRef, swift::SourceLoc, bool, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >) + 1468
8  swift                    0x000000010bddebc6 swift::ClangImporter::importBridgingHeader(llvm::StringRef, swift::ModuleDecl*, swift::SourceLoc, bool) + 502
9  swift                    0x000000010bdcef2d swift::CompilerInstance::performSema() + 605
10 swift                    0x000000010b912596 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 934
11 swift                    0x000000010b91168d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
12 swift                    0x000000010b90d0ac main + 1932
13 libdyld.dylib            0x00007fff61e31015 start + 1
14 libdyld.dylib            0x0000000000000049 start + 2652696629
Stack dump:
0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/WebAppConfiguration.o 

CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift
    cd /Users/admin/src/iosbug/dist/ios/project
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.o
/Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h:28:9: error: 'Cordova/CDV.h' file not found
#import <Cordova/CDV.h>
        ^
0  swift                    0x000000010406666b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x0000000104065956 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x0000000104066ccf SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff6213ff5a _sigtramp + 26
4  libsystem_platform.dylib 0x000000000000000d _sigtramp + 2649489613
5  swift                    0x0000000102281737 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 151
6  swift                    0x0000000102281802 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 354
7  swift                    0x000000010228244c swift::ClangImporter::Implementation::importHeader(swift::ModuleDecl*, llvm::StringRef, swift::SourceLoc, bool, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >) + 1468
8  swift                    0x0000000102282bc6 swift::ClangImporter::importBridgingHeader(llvm::StringRef, swift::ModuleDecl*, swift::SourceLoc, bool) + 502
9  swift                    0x0000000102272f2d swift::CompilerInstance::performSema() + 605
10 swift                    0x0000000101db6596 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 934
11 swift                    0x0000000101db568d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
12 swift                    0x0000000101db10ac main + 1932
13 libdyld.dylib            0x00007fff61e31015 start + 1
14 libdyld.dylib            0x0000000000000049 start + 2652696629
Stack dump:
0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundleManager.o 

CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift
    cd /Users/admin/src/iosbug/dist/ios/project
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.o
/Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h:28:9: error: 'Cordova/CDV.h' file not found
#import <Cordova/CDV.h>
        ^
0  swift                    0x000000010bd7666b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x000000010bd75956 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x000000010bd76ccf SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff6213ff5a _sigtramp + 26
4  libsystem_platform.dylib 0x000000000000000d _sigtramp + 2649489613
5  swift                    0x0000000109f91737 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 151
6  swift                    0x0000000109f91802 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 354
7  swift                    0x0000000109f9244c swift::ClangImporter::Implementation::importHeader(swift::ModuleDecl*, llvm::StringRef, swift::SourceLoc, bool, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >) + 1468
8  swift                    0x0000000109f92bc6 swift::ClangImporter::importBridgingHeader(llvm::StringRef, swift::ModuleDecl*, swift::SourceLoc, bool) + 502
9  swift                    0x0000000109f82f2d swift::CompilerInstance::performSema() + 605
10 swift                    0x0000000109ac6596 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 934
11 swift                    0x0000000109ac568d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
12 swift                    0x0000000109ac10ac main + 1932
13 libdyld.dylib            0x00007fff61e31015 start + 1
14 libdyld.dylib            0x0000000000000049 start + 2652696629
Stack dump:
0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift -primary-file /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/iosbug/dist/ios/project/clean_app/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-generated-files.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-own-target-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/clean_app-project-headers.hmap -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/DerivedSources -Xcc -working-directory/Users/admin/src/iosbug/dist/ios/project -emit-module-doc-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle~partial.swiftdoc -O -module-name clean_app -emit-module-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.dia -emit-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.d -emit-reference-dependencies-path /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.swiftdeps -o /Users/admin/src/iosbug/dist/ios/project/build/clean_app.build/Release-iphoneos/clean_app.build/Objects-normal/arm64/AssetBundle.o 

<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
** BUILD FAILED **


The following build commands failed:
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift
	CompileSwift normal arm64 /Users/admin/src/iosbug/dist/ios/project/clean_app/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(5 failures)

iOS status bar padding missing

After upgrading to 1.4, I was only able to run iOS by using this package. On the device it seeems to have trimmed off 20px or so.

Provide an API to change ROOT_URL

there's a way that we can replace ROOT_URL by put a script on top of other js, but this doesn't change HCP url.

image

could we Provide an api to let change root_url ??
something like this

WebAppLocalServer.replaceRootUrl('http://anotherapp.com')

@martijnwalraven

Serving from localhost causes severe problems with Cookies

In it's current state, this cordova plugin serves all static page content from localhost:12008, while leaving the meteor root URL configuration set to the live deployment server ($ROOT for short).

As I understand, this is done to enable high-level caching behaviors to be implemented in native code. However the way that meteor-webapp interacts with the clientside app causes severe problems with regards to Same Origin Policy, as we have been experiencing especially with Cookies.

Since the WebView is viewing a page on the localhost:12008 origin, the clientside app doesn't have access (neither read nor write) to the Cookies that are sent to $ROOT. This has been a long standing problem with the Meteor-Files package for example (veliovgroup/Meteor-Files#159), and could only be incompletely solved by substituting URL tokens for authentication, which opens up a lot of other issues (difference between mobile and desktop handling, token expiry concerns, security concerns if URLs are shared...).

Cookies are also a very important tool in any professional deployment setup, for example as the key client identification method for Load Balancers. In fact it is the only method that e.g. the AWS Classic LoadBalancer supports for 'Sticky Sessions'. While these cookies can be set by the remote server using the Set-Cookie header, they will only be used by direct, browser-initiated requests (e.g. img tags...) and not for XHR requests, which would become relevant at the latest e.g. when a client or network connection doesn't support WebSockets (for example behind a TCP-only corporate firewall).

It is also in general quite complicated to set up things like the CORS policy, always having to account for Cordova apps sending requests from the wrong origin. For all of these reasons, it would be a major improvement to have Cordova apps running from $ROOT as their origin as well.

I see multiple ways of accomplishing this:

  • Have the localhost server proxy all non-static requests to the actual $ROOT and make it 'MITM' the real application server.
  • Replace the caching mechanism with a serviceWorker. The serviceWorker by design acts as a transparent proxy and doesn't require potentially tricky configuration to hide the original $ROOT and inject static files. Not only are caching and HCP perfectly centered on what serviceWorkers have been designed to accomplish, serviceWorkers also provide a cross-platform solution that would no-longer require maintaining to separate codebases in different native languages.

crosswalk android login

deviceready has not fired after 5 seconds.
cordova.js:1178 Channel not fired: onDOMContentLoaded
webapp.js:68 Error: Error parsing asset manifest
at http://localhost:12168/plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js:36:21
at Object.callbackFromNative (http://localhost:12168/cordova.js:293:58)
at processMessage (http://localhost:12168/cordova.js:1081:17)
at processMessages (http://localhost:12168/cordova.js:1104:9)
at pollOnce (http://localhost:12168/cordova.js:973:9)
at pollOnceFromOnlineEvent (http://localhost:12168/cordova.js:960:5)(anonymous function) @ webapp.js:68

GCD local web server should run in the background

In normal app startup, the app is started in the foreground, the WebAppLocalServer plugin starts the GCD local web server, the Cordova WKWebViewEngine plugin starts the web view, and the Meteor app loads from the local web server.

The GCD local web server is stopped when the application enters the background. (See https://github.com/awwx/meteor-bg-web-bug for a reproduction).

When an app enters the background, typically iOS will suspend the app after a couple of seconds, so most applications may not notice that the local web server isn't running (the app won't be doing anything, much less making requests to the local web server, when it's suspended).

However, iOS apps can request additional running time in the background.

An iOS app can also be started in the background.

For example, an iOS app can request that a file be uploaded or downloaded in the background, so that the file transfer can run even if the app itself isn't running. The app can have iOS notify the app when the file transfer completes (so that, for example, it can record that the file transfer finished or show a notification to the user). If the app isn't running at the time the file transfer completes, iOS will start the app in the background to provide the notification.

I had previously noted that the app version was being blacklisted when the app started in the background, and I offered a PR to not start the backlist timer. However the real issue as it turns out is that Meteor is attempting to start up in the web view... but Meteor fails to load because the GCD web server isn't running at that point.

(Specifically, the CDVViewController loadRequest: method is called, and the WKWebViewEngine didStartProvisionalNavigation: method is triggered, but it never makes it to the WKWebViewEngine didFinishNavigation: method or to the WebAppLocalServer pageDidLoad method.)

If the user then brings the app into the foreground (for example, if they saw the notification that the file upload completed and opened the app), at that point the app is hung at the splash screen because the web view had already tried and failed to load the app.

We can tell the GCD local server to not stop in the background:

    let options = [
      GCDWebServerOption_Port: NSNumber(value: localServerPort as UInt),
      GCDWebServerOption_BindToLocalhost: true,
      GCDWebServerOption_AutomaticallySuspendInBackground: false]  // <-- added
    try localServer.start(options: options)

No type or protocol named 'CDVWebViewEngineProtocol'

The attached screenshot show an error code that I receive while building for iOS.

The issue started when I upgraded to Meteor 1.3 and still exists with 1.3.1.

All the plugins are at their latest version.

The error is coming from METPlugin.h

screen shot 2016-04-05 at 10 53 04 am

Cordova/CDV.h file not found for IOS

meteor create clean_proj
cd clean_proj
meteor add-platform ios
meteor run ios-device

Result:

CompileSwift normal arm64 /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift
    cd /Users/admin/src/mobile.callerip.ca/dist/ios/project
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift -primary-file /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-generated-files.hmap -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-own-target-headers.hmap -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-project-headers.hmap -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/DerivedSources -Xcc -working-directory/Users/admin/src/mobile.callerip.ca/dist/ios/project -emit-module-doc-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle~partial.swiftdoc -O -module-name meteor -emit-module-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.dia -emit-dependencies-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.d -emit-reference-dependencies-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.swiftdeps -o /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.o
/Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Bridging-Header.h:28:9: error: 'Cordova/CDV.h' file not found
#import <Cordova/CDV.h>
        ^
0  swift                    0x0000000109d0d66b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x0000000109d0c956 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x0000000109d0dccf SignalHandler(int) + 287
3  libsystem_platform.dylib 0x00007fff6213ff5a _sigtramp + 26
4  libsystem_platform.dylib 0x000000000000000d _sigtramp + 2649489613
5  swift                    0x0000000107f28737 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 151
6  swift                    0x0000000107f28802 swift::ClangImporter::Implementation::addEntryToLookupTable(clang::Sema&, swift::SwiftLookupTable&, clang::NamedDecl*) + 354
7  swift                    0x0000000107f2944c swift::ClangImporter::Implementation::importHeader(swift::ModuleDecl*, llvm::StringRef, swift::SourceLoc, bool, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >) + 1468
8  swift                    0x0000000107f29bc6 swift::ClangImporter::importBridgingHeader(llvm::StringRef, swift::ModuleDecl*, swift::SourceLoc, bool) + 502
9  swift                    0x0000000107f19f2d swift::CompilerInstance::performSema() + 605
10 swift                    0x0000000107a5d596 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 934
11 swift                    0x0000000107a5c68d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
12 swift                    0x0000000107a580ac main + 1932
13 libdyld.dylib            0x00007fff61e31015 start + 1
14 libdyld.dylib            0x0000000000000049 start + 2652696629
Stack dump:
0.	Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift -primary-file /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/Asset.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundleDownloader.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetManifest.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/Errors.swift /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/Utility.swift -target arm64-apple-ios9.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -I /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos -F /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos -g -import-objc-header /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Bridging-Header.h -serialize-debugging-options -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-generated-files.hmap -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-own-target-headers.hmap -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/meteor-project-headers.hmap -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos/usr/local/lib/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/UninstalledProducts/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/UninstalledProducts/iphoneos/include -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/Release-iphoneos -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/DerivedSources/arm64 -Xcc -I/Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/DerivedSources -Xcc -working-directory/Users/admin/src/mobile.callerip.ca/dist/ios/project -emit-module-doc-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle~partial.swiftdoc -O -module-name meteor -emit-module-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle~partial.swiftmodule -serialize-diagnostics-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.dia -emit-dependencies-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.d -emit-reference-dependencies-path /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.swiftdeps -o /Users/admin/src/mobile.callerip.ca/dist/ios/project/build/meteor.build/Release-iphoneos/meteor.build/Objects-normal/arm64/AssetBundle.o 

<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
** BUILD FAILED **


The following build commands failed:
	CompileSwift normal arm64 /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/WebAppLocalServer.swift
	CompileSwift normal arm64 /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/WebAppConfiguration.swift
	CompileSwift normal arm64 /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundleManager.swift
	CompileSwift normal arm64 /Users/admin/src/mobile.callerip.ca/dist/ios/project/meteor/Plugins/cordova-plugin-meteor-webapp/AssetBundle.swift
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(5 failures)

Support for new iOS11 safe-area-inset-* CSS rule.

In order to design around the iPhoneX 'notch', Apple provides some styling variables (safe-area-inset-*) to help set padding. In meteor's ios webview these values always evaluate to 0. The workaround is to use a cordova plugin to determine if the device is an iPhoneX and then add a class to the <body> and provide the padding manually. I've only tested this on the sim, so I may be mistaken about this problem existing on an actual device.

Thanks.

SWIFT_VERSION doesn't get set the first time you run from a clean state

In our attempt to automate our builds we've been encountering the "Set SWIFT_VERSION" issue on our build machines, whereas they most of the time start from a clean state.

I am (and our machines as well) using meteor 1.4.2.3 and [email protected].

To check if the XCode project has the flag set I am using the following search command in the generated xcode project's directory.
find . -type f -exec grep -Hn SWIFT_VERSION {} \;

Which returns (in my case) 3 results locally. However if I delete the build folder, run a meteor reset and re-build the project using meteor build, the find command returns 0 results instead and XCode throws an error when building from command line (obviously, since SWIFT_VERSION is not set).

I am thinking of a workaround using another plugin which allows injecting parameters in the .pbxproj, however I wanted to know if this issue was known and if there were already a workaround (that does not require you to build the project twice to populate the .meteor/codova-build folder beforehand).

Cheers

Doc: how to retrieve a new assetbundle in native code

The Android map plugin I am bulding uses meteor assets as marker image. I open them with context.getResources().getAssets().open(filePath);

All assets are placed in public folder (public/icons/xxx.png), and for a plugin to access assets, I use this path www/application/app/icons/xxx.png

But I can only access the initial bundle. When a new assets bundle is pushed, the plugins still displays the old assets.

So what it is the path to use for an assets from a new bundle?

No tag for v1.4.2

Minor issue but just wanted to mention:

Release v1.4.2 doesn't seem to have been tagged and uploaded.

Thanks!
-Lee

Pull requests: GCDWebServer & HCP

I opened some pull requests in an effort to get some discussion started around updating GCDWebServer and applying some of the proposed fixes to the HCP mechanism.

@abernix I think it would be nice to invest some time in this as these issues are probably hitting many developers, of which most are not aware that these issues even exist (simply asking their users to restart/reinstall the application).

With Meteor 1.6 you have reached a new level of stability, in terms of server and client, I think the Cordova implementation should be able to perform likewise.

Version mismatch for index page

Trying to understand exactly what this means. I'm getting this when I point to my production system in AWS ELB.

message: "Version mismatch for index page, expected: 158efbf027f653683e4710636e4f1f6b2ecd0d41, actual: 0893ceba7da84eaa6d4b91dfa746e26b7c9a78a

cannot build with 1.6.3+

In attempting to upgrade from 1.8.0.2 to 1.8.1-beta-16 my android build no longer compiles.

I've removed all my cordova plugins and tracked it down to cordova-plugin-meteor-webapp 1.6.3+

Using any previous version builds OK (but crashes immediately on install because no plugins), but starting with 1.6.3 up to yesterday's 1.6.5 I get the following build error:

                                              
   While running Cordova app for platform Android with options --buildConfig,/home/chris/inout/.meteor/local/cordova-build/build.json,--device:
   Error: Command failed: /home/chris/inout/.meteor/local/cordova-build/platforms/android/cordova/run --buildConfig /home/chris/inout/.meteor/local/cordova-build/build.json --device
   FAILURE: Build failed with an exception.
   
   * Where:
   Script '/home/chris/inout/.meteor/local/cordova-build/platforms/android/cordova-plugin-meteor-webapp/app-build-extras.gradle' line: 24
   
   * What went wrong:
   A problem occurred evaluating project ':app'.
   > Cannot add task ':app:cdvCreateAssetManifest' as a task with that name already exists.

Downgrading to 1.6.2 builds, upgrading to 1.6.3 doesn't.

I'm on Linux Mint. gradle command line gives v 4.10.2 (whether or not that's the version meteor is using I'm not sure).

Hot reload crashes on swift 3 / iOS 10 when there is a path in the URL

Moved this discussion from #11

Using the swift 3 version of this plugin, window.location.reload() and window.location.replace(window.location.href) both crash our app, so hot reloads crash the app. But when you reopen it, it's at the new version. So other than the pesky crash in the middle, hot reloads work. I can reproduce this by just connecting through the Safari console and entering window.location.reload() manually. Crashes every time. The error message says it's looking for a local file named "/jobs", which does not exist. /jobs is the route it's on when hot reloading.

I'm thinking it might be a problem with the built in web server. Maybe it needs to be updated to properly serve the app even if there are extra path components.

As a workaround, the hot reload works without crashing when I replace the window.location.replace(window.location.href) call with:

const urlSansPath = `${window.location.protocol}//${window.location.host}/`;
window.location.replace(urlSansPath);

Android: Incorrect version of index document loaded on HCP

On reload from HCP, the index document loaded is of the previous version/bundle while other scripts/assets are loaded from the new version/bundle. This can be observed by inspecting meteor_runtime_config.autoupdateVersionCordova which remains the same until the app is restarted (or a browser refresh is forced from chrome inspector).

Adding breakpoints in native code I was able to confirm that remapUri() for the document request was invoked before the call to onReset() on WebAppLocalServer causing the document to be served from the previous bundle.

This appears to be a race condition between the web engine and the main thread as I've seen some cases where onReset() was called first. I've also seen multiple requests go thru before onReset() when putting a breakpoint in onReset().

Can be reproduced with blank project using Meteor 1.3.2.3. This does not occur with iOS.

ROOT_URL being replaced on iOS with the value from the server

Hello, I have multiple subdomains running on the same Meteor Galaxy server and I use the subdomain to identify which customer is accessing my App and with that information, I'm able to deliver specific content.

On Android, it works fine but on iOS, there is this code in this plugin that replaces the ROOT_URL value with the server settings.json ROOT_URL value and it breaks my way of discovering who is the current customer because on the server I have a different ROOT_URL than on each customer App.

As each customer has a different ROOT_URL I can't use the ROOT_URL from the server.

See the logs (native.app.staging.pathable.com is the customer URL and staging.pathable.com is the ROOT_URL from the server) from XCode running my Cordova App:

Start downloading asset manifest from: manifest.json -- http://native.app.staging.pathable.com/__cordova/
....
2018-06-04 14:58:43.244518-0400 Pathable[285:11515] ROOT_URL seems to have changed, new: http://staging.pathable.com/, old: http://native.app.staging.pathable.com/

Is there a way to disable this code from running? Or I need to create a fork to customize this behavior? Or how can I create a pull request to make it configurable?

Uncaught SyntaxError: Unexpected token =>

This is an issue that I was able to reproduce in Android Emulator with API 22. Unfortunately I don't have a physical device with API 22 (Android 5.1).

How to reproduce the issue

  1. Create a new app even with meteor create command. In my case it created a 1.8.0.2 app.
  2. Add the android platform
  3. Add cordova-plugin-meteor-webapp: meteor add cordova:[email protected] (the issue is there already from 1.6.1).
  4. Fire up the Emulator
  5. Run the app with meteor run android.
  6. The app is launched, but it never gets past the splashscreen.

If you connect with Chrome DevTools you will see in console the message above.

Notes

  • The issue is not reproducible in API 23 (Android 6.0) and above
  • I cannot confirm yet (but I strongly suspect) that it is reproducible with API version below 22 also.

'priority' is only available on iOS 8.0 or newer

Hi, I'm currently running [email protected] due to some issues with HCP and have recently run into Xcode build errors related to ...is only available on iOS 8.0 or newer when attempting to build against a 7.0 Deployment target:

ios-8 0-or-newer

I need to support 7.0. Is there a workaround for this?

Thanks in advance for all of your hard work on Meteor!

GCDWebServer diff between v1.4.2 and v1.5.2

I created a PR on the forked GCDWebServer repository to make the differences between v1.4.2 and v1.5.2 apparent.

meteor/GCDWebServer#1

This is not an actual issue, but given the recent efforts into bringing this package up tot date with 2018 (or 2017 even) and potential issues these changes might cause it could be handy to have it around for bughunting.

how to run the tests

I have created empty cordova project. Added everything according to https://github.com/apache/cordova-plugin-test-framework.
But it seems I am missing something as almost every test fails. The main reason is that Promise is undefined. Can I do something about it?

BTW, thers is a typo here I guess:
https://github.com/meteor/cordova-plugin-meteor-webapp/blob/master/tests/www/tests.js#L213
xit instead of it

Also I am not sure if this is significant but the versions fixtures have files in wrong path.
Example:
https://github.com/meteor/cordova-plugin-meteor-webapp/blob/master/tests/fixtures/downloadable_versions/version2/manifest.json#L54 while the file is not in the app dir:
https://github.com/meteor/cordova-plugin-meteor-webapp/blob/master/tests/fixtures/downloadable_versions/version2/some-data.json

Is there any way to assign port number manually on iOS?

Hi,

we now pick a port from a predetermined range (12000-13000), calculated based on the appId.

I'm developing a multi tenancy app where all my clients will share database and a single meteor app, but each one will have its own mobile app. So I build all the apps from the same base code, modifying the mobile-config.js file and then getting the app's package name at runtime to redirect to the proper root page for this client.

The only issue I have is that I cannot run more than one app on iOS at the same time. I guess the problem is that the Meteor appId is the same for all the apps so the port is the same. Is there any way to assign the port number manually?

Thanks

Hot code push failure because of assetmanager

Hot code push seems to fail with an exception about

MeteorWebApp: Download failure
I20170124-17:06:12.565(2)? 01-24 15:06:11.780 32223   818 W MeteorWebApp: com.meteor.webapp.WebAppException: Non-success status code 404 for asset: /
I20170124-17:06:12.565(2)? 01-24 15:06:11.780 32223   818 W MeteorWebApp: 	at com.meteor.webapp.AssetBundleDownloader.verifyResponse(AssetBundleDownloader.java:155)

Debugging further this seems to stem from the automatically added asset "index.html" with url "/" in the AssetBundle constructor.
It then fails to download this asset with the above exception.
the manifest.json doesnt seem to have any entry for index.html or /,
is this supposed to be this way?
is this is an error in generating the manifest?
is this an with meteor not serving / or /index.html correctly?
I see the index in the assets

Everytime download assets.

Hi,

Whenever I install application it takes too much time in start up. I found out that this issue is because its downloading assets bundle.

Is this normal behaviour? Can we prevent downloading assets bundle and provide it in local, So we can speed up the process of start up.

My first time start up log is :

2016-12-13 13:19:17.094 Hoopla[8926:246270] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/Trainee6/Library/Developer/CoreSimulator/Devices/298BE16C-7F62-499F-8F4A-0167C7021DE7/data/Containers/Data/Application/867E1B21-13BD-4CCE-9E75-D9741703922C/Library/Cookies/com.poeticsystems.hoopla.binarycookies
2016-12-13 13:19:17.666 Hoopla[8926:246270] Apache Cordova native platform version 4.1.0 is starting.
2016-12-13 13:19:17.667 Hoopla[8926:246270] Multi-tasking -> Device: YES, App: YES
2016-12-13 13:19:17.713 Hoopla[8926:246270] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file

2016-12-13 13:19:17.830 Hoopla[8926:246270] Using WKWebView
2016-12-13 13:19:17.831 Hoopla[8926:246270] [CDVTimer][handleopenurl] 0.073016ms
2016-12-13 13:19:17.833 Hoopla[8926:246270] [CDVTimer][intentandnavigationfilter] 2.043962ms
2016-12-13 13:19:17.834 Hoopla[8926:246270] [CDVTimer][gesturehandler] 0.111043ms
2016-12-13 13:19:18.697 Hoopla[8926:246270] Serving asset bundle version: 2f33e31004f3ded6008240fe17789b6e3703f8b5
[INFO] GCDWebServer started on port 12936 and reachable at http://localhost:12936/
2016-12-13 13:19:18.719 Hoopla[8926:246270] [CDVTimer][webapplocalserver] 885.114014ms
2016-12-13 13:19:18.837 Hoopla[8926:246270] [CDVTimer][statusbar] 118.157983ms
2016-12-13 13:19:18.866 Hoopla[8926:246270] [CDVTimer][splashscreen] 28.077006ms
2016-12-13 13:19:18.939 Hoopla[8926:246270] [CDVTimer][socialsharing] 72.655976ms
2016-12-13 13:19:18.939 Hoopla[8926:246270] [CDVTimer][branchdevice] 0.176013ms
2016-12-13 13:19:18.939 Hoopla[8926:246270] [CDVTimer][TotalPluginStartup] 1108.386993ms
2016-12-13 13:19:19.550 Hoopla[8926:246270] createNotificationChecker
2016-12-13 13:19:19.550 Hoopla[8926:246270] not coldstart
2016-12-13 13:19:19.551 Hoopla[8926:246270] active
2016-12-13 13:19:19.551 Hoopla[8926:246270] PushPlugin skip clear badge
2016-12-13 13:19:21.125 Hoopla[8926:246270] THREAD WARNING: ['Device'] took '88.340820' ms. Plugin should use a background thread.
2016-12-13 13:19:24.274 Hoopla[8926:246270] Start downloading asset manifest from: manifest.json -- https://app.hoopla.social/__cordova/
2016-12-13 13:19:24.275 Hoopla[8926:246270] THREAD WARNING: ['WebAppLocalServer'] took '35.203857' ms. Plugin should use a background thread.
2016-12-13 13:19:25.372 Hoopla[8926:246496] Downloaded asset manifest for version: 1adaf996923762225ff73ef675d32968ce0a63f4
2016-12-13 13:19:25.379 Hoopla[8926:246493] Start downloading assets from bundle with version: 1adaf996923762225ff73ef675d32968ce0a63f4
2016-12-13 13:19:26.244 Hoopla[8926:246496] [CDVTimer][assetBundleDownload] 865.135968ms
2016-12-13 13:19:26.245 Hoopla[8926:246378] Finished downloading new asset bundle version: 1adaf996923762225ff73ef675d32968ce0a63f4
2016-12-13 13:19:26.269 Hoopla[8926:246270] Serving asset bundle version: 1adaf996923762225ff73ef675d32968ce0a63f4
2016-12-13 13:19:26.679 Hoopla[8926:246496] Start: 8175722687a34fd68f472063827ffc8f
2016-12-13 13:19:26.761 Hoopla[8926:246270] Appsee is working!
2016-12-13 13:19:26.893 Hoopla[8926:246378] Push Plugin register called
2016-12-13 13:19:26.893 Hoopla[8926:246378] PushPlugin.register: setting badge to false
2016-12-13 13:19:26.894 Hoopla[8926:246378] PushPlugin.register: clear badge is set to 0
2016-12-13 13:19:26.894 Hoopla[8926:246378] PushPlugin.register: better button setup
2016-12-13 13:19:26.895 Hoopla[8926:246378] GCM Sender ID (null)
2016-12-13 13:19:26.895 Hoopla[8926:246378] Using APNS Notification
2016-12-13 13:19:26.899 Hoopla[8926:246270] Push Plugin register failed
2016-12-13 13:19:28.648 Hoopla[8926:246270] active
2016-12-13 13:19:28.648 Hoopla[8926:246270] PushPlugin skip clear badge

And a normal start up log is :

2016-12-13 13:21:16.823 Hoopla[8973:247326] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/Trainee6/Library/Developer/CoreSimulator/Devices/298BE16C-7F62-499F-8F4A-0167C7021DE7/data/Containers/Data/Application/E724DDD5-F06B-4A9F-A677-97F7B4F4A082/Library/Cookies/com.poeticsystems.hoopla.binarycookies
2016-12-13 13:21:16.991 Hoopla[8973:247326] Apache Cordova native platform version 4.1.0 is starting.
2016-12-13 13:21:16.991 Hoopla[8973:247326] Multi-tasking -> Device: YES, App: YES
2016-12-13 13:21:17.023 Hoopla[8973:247326] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file

2016-12-13 13:21:17.179 Hoopla[8973:247326] Using WKWebView
2016-12-13 13:21:17.180 Hoopla[8973:247326] [CDVTimer][handleopenurl] 0.074983ms
2016-12-13 13:21:17.183 Hoopla[8973:247326] [CDVTimer][intentandnavigationfilter] 2.080023ms
2016-12-13 13:21:17.183 Hoopla[8973:247326] [CDVTimer][gesturehandler] 0.182033ms
2016-12-13 13:21:17.393 Hoopla[8973:247326] Serving asset bundle version: 1adaf996923762225ff73ef675d32968ce0a63f4
[INFO] GCDWebServer started on port 12936 and reachable at http://localhost:12936/
2016-12-13 13:21:17.395 Hoopla[8973:247326] [CDVTimer][webapplocalserver] 211.467028ms
2016-12-13 13:21:17.476 Hoopla[8973:247326] [CDVTimer][statusbar] 80.721974ms
2016-12-13 13:21:17.508 Hoopla[8973:247326] [CDVTimer][splashscreen] 31.506956ms
2016-12-13 13:21:17.615 Hoopla[8973:247326] [CDVTimer][socialsharing] 106.837034ms
2016-12-13 13:21:17.615 Hoopla[8973:247326] [CDVTimer][branchdevice] 0.127017ms
2016-12-13 13:21:17.615 Hoopla[8973:247326] [CDVTimer][TotalPluginStartup] 435.151994ms
2016-12-13 13:21:17.620 Hoopla[8973:247326] createNotificationChecker
2016-12-13 13:21:17.620 Hoopla[8973:247326] not coldstart
2016-12-13 13:21:17.620 Hoopla[8973:247326] active
2016-12-13 13:21:17.621 Hoopla[8973:247326] PushPlugin skip clear badge
2016-12-13 13:21:18.888 Hoopla[8973:247455] Start: 8175722687a34fd68f472063827ffc8f
2016-12-13 13:21:18.957 Hoopla[8973:247326] Appsee is working!
2016-12-13 13:21:19.142 Hoopla[8973:247530] Push Plugin register called
2016-12-13 13:21:19.144 Hoopla[8973:247530] PushPlugin.register: setting badge to false
2016-12-13 13:21:19.144 Hoopla[8973:247530] PushPlugin.register: clear badge is set to 0
2016-12-13 13:21:19.144 Hoopla[8973:247530] PushPlugin.register: better button setup
2016-12-13 13:21:19.145 Hoopla[8973:247530] GCM Sender ID (null)
2016-12-13 13:21:19.145 Hoopla[8973:247530] Using APNS Notification
2016-12-13 13:21:19.151 Hoopla[8973:247326] Push Plugin register failed

Can someone please reply soon. Its an emergency.

Error fetching plugin: reference is not a tree

I am having an issue adding this as a plugin to Cordova. Not sure if this is happening to others or if it is just something I am doing wrong. When I go to compile I am getting the following error:

=> Errors executing Cordova commands:                                              

   While adding plugin https://github.com/meteor/cordova-plugin-meteor-webapp.git#8bf95eed3f313299fc2de33658866278eea2cdc5 to Cordova
   project:
   Cordova error: Failed to fetch plugin https://github.com/meteor/cordova-plugin-meteor-webapp.git via git.
   Either there is a connection problems, or plugin spec is incorrect:
   Error: git: Command failed with exit code 128 Error output:
   fatal: reference is not a tree: 8bf95eed3f313299fc2de33658866278eea2cdc5
   at
   /Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/plugman/fetch.js:88:33
   at _rejected
   (/Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:844:24)
   at
   /Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:870:30
   at Promise.when
   (/Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:1122:31)
   at Promise.promise.promiseDispatch
   (/Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:788:41)
   at
   /Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:604:44
   at runSingle
   (/Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:137:13)
   at flush
   (/Users/labnc_966/.meteor/packages/meteor-tool/.1.4.1_2.fpzmec++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/node_modules/cordova-common/node_modules/q/q.js:125:13)
   at nextTickCallbackWith0Args (node.js:420:9)
   at process._tickCallback (node.js:349:13)
   (If the error message contains suggestions for a fix, note that this may not apply to the Meteor integration. You can try running again
   with the --verbose option to help diagnose the issue.)

From a little bit of research it looks like it might have to do with a submodule not being properly committed or something to that effect. Any help would be appreciated. Thanks!

startup timer starting when entering foreground

Hi @martijnwalraven, I noticed that you made a commit on the master so you Don't restart timer when entering the foreground, is there any reason why you didn't apply this to the swift3 brunch? I'm using that for my app and I see that piece of code is causing my app to forceReload every time enter the app from the background if the version I have was previously updated.

Thanks

Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service

For some reason, I cannot get the app to run on iOS..

I have tried many things.... all with different kinds of errors..

here is where I am now...

im running [email protected] ... older versions stopped working for me :/

This version uses Cordova 7 which now does not need cordova-plugin-console...

But for some reason Meteor keeps adding this plugin to my project.

So after I build I have to manually remove it

After removing CDVLogger plugin files the app builds

But it does not load the webview at all.... instead I just get the error

Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service

Here are my cordova plugins

cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
  {
    "id": "cordova-plugin-splashscreen.SplashScreen",
    "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js",
    "pluginId": "cordova-plugin-splashscreen",
    "clobbers": [
      "navigator.splashscreen"
    ]
  },
  {
    "id": "cordova-plugin-statusbar.statusbar",
    "file": "plugins/cordova-plugin-statusbar/www/statusbar.js",
    "pluginId": "cordova-plugin-statusbar",
    "clobbers": [
      "window.StatusBar"
    ]
  },
  {
    "id": "cordova-plugin-inappbrowser.inappbrowser",
    "file": "plugins/cordova-plugin-inappbrowser/www/inappbrowser.js",
    "pluginId": "cordova-plugin-inappbrowser",
    "clobbers": [
      "cordova.InAppBrowser.open",
      "window.open"
    ]
  },
  {
    "id": "cordova-plugin-camera.Camera",
    "file": "plugins/cordova-plugin-camera/www/CameraConstants.js",
    "pluginId": "cordova-plugin-camera",
    "clobbers": [
      "Camera"
    ]
  },
  {
    "id": "cordova-plugin-camera.CameraPopoverOptions",
    "file": "plugins/cordova-plugin-camera/www/CameraPopoverOptions.js",
    "pluginId": "cordova-plugin-camera",
    "clobbers": [
      "CameraPopoverOptions"
    ]
  },
  {
    "id": "cordova-plugin-camera.camera",
    "file": "plugins/cordova-plugin-camera/www/Camera.js",
    "pluginId": "cordova-plugin-camera",
    "clobbers": [
      "navigator.camera"
    ]
  },
  {
    "id": "cordova-plugin-camera.CameraPopoverHandle",
    "file": "plugins/cordova-plugin-camera/www/ios/CameraPopoverHandle.js",
    "pluginId": "cordova-plugin-camera",
    "clobbers": [
      "CameraPopoverHandle"
    ]
  },
  {
    "id": "cordova-plugin-wkwebview-engine.ios-wkwebview-exec",
    "file": "plugins/cordova-plugin-wkwebview-engine/src/www/ios/ios-wkwebview-exec.js",
    "pluginId": "cordova-plugin-wkwebview-engine",
    "clobbers": [
      "cordova.exec"
    ]
  },
  {
    "id": "cordova-plugin-meteor-webapp.WebAppLocalServer",
    "file": "plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js",
    "pluginId": "cordova-plugin-meteor-webapp",
    "merges": [
      "WebAppLocalServer"
    ]
  },
  {
    "id": "cordova-plugin-googleplus.GooglePlus",
    "file": "plugins/cordova-plugin-googleplus/www/GooglePlus.js",
    "pluginId": "cordova-plugin-googleplus",
    "clobbers": [
      "window.plugins.googleplus"
    ]
  },
  {
    "id": "cordova-plugin-device.device",
    "file": "plugins/cordova-plugin-device/www/device.js",
    "pluginId": "cordova-plugin-device",
    "clobbers": [
      "device"
    ]
  },
  {
    "id": "cordova-plugin-keyboard.keyboard",
    "file": "plugins/cordova-plugin-keyboard/www/keyboard.js",
    "pluginId": "cordova-plugin-keyboard",
    "clobbers": [
      "window.Keyboard"
    ]
  },
  {
    "id": "cordova-plugin-launchscreen-storyboard.launchscreen",
    "file": "plugins/cordova-plugin-launchscreen-storyboard/www/launchscreen.js",
    "pluginId": "cordova-plugin-launchscreen-storyboard",
    "clobbers": [
      "window.LaunchScreen"
    ]
  }
];
module.exports.metadata = 
// TOP OF METADATA
{
  "cordova-plugin-splashscreen": "4.0.3",
  "cordova-plugin-statusbar": "2.2.3",
  "cordova-plugin-inappbrowser": "1.7.1",
  "cordova-plugin-compat": "1.2.0",
  "cordova-plugin-camera": "2.4.1",
  "cordova-plugin-whitelist": "1.3.2",
  "cordova-plugin-wkwebview-engine": "1.1.3",
  "cordova-plugin-meteor-webapp": "1.4.0",
  "cordova-plugin-googleplus": "5.1.1",
  "cordova-plugin-device": "1.1.6",
  "cordova-plugin-keyboard": "1.1.4",
  "cordova-plugin-launchscreen-storyboard": "1.0.1"
};
// BOTTOM OF METADATA
});

It says it is using cordova-plugin-meteor-webapp: 1.4.0

But in my plugins file I defined version 1.4.2, but it wont install 1.4.2... even after clearing everything (old build folders), restarting, etc

I have also tried without cordova-plugin-wkwebview-engine plugin. I never used it originally but just added it in an attempt to get the app to build.

I have no idea how to proceed. I cannot build my app for iOS anymore, and I have been working the whole day trying to build it. I am stuck. Please help.

HCP not working android [email protected]

HCP stopped working after upgrading to [email protected]

Works on IOS,

I am on meteor version: [email protected]

I am able to download the bundle, but the assets are missing..

12-22 03:58:23.306 28337-28475/com.bs.don2 W/MeteorWebApp: Asset /cordova.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.325 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /cordova_plugins.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.338 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/phonegap-plugin-push/www/push.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.339 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-device/www/device.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.382 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-meteor-webapp/www/webapp_local_server.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.386 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-keyboard/www/keyboard.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.419 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-camera/www/CameraConstants.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.421 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-camera/www/CameraPopoverOptions.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.434 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-camera/www/Camera.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.435 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-camera/www/CameraPopoverHandle.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.444 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-statusbar/www/statusbar.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.445 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-splashscreen/www/splashscreen.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.451 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-android-permissions/www/permissions.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.454 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-app-version/www/AppVersionPlugin.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.459 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-dialogs/www/notification.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.845 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-dialogs/www/android/notification.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.846 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/DirectoryEntry.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
Asset /plugins/cordova-plugin-file/www/DirectoryReader.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.848 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/Entry.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.849 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/File.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.850 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/FileEntry.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.883 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/FileReader.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.884 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/FileSystem.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.885 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/FileUploadOptions.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.885 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/FileUploadResult.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.885 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/FileWriter.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.887 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/FileError.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.891 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/Flags.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.892 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/LocalFileSystem.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.893 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/Metadata.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.893 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/ProgressEvent.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.895 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/fileSystems.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.896 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/requestFileSystem.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.899 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.899 28337-28337/com.bs.don2 D/SystemWebChromeClient: http://localhost:12648/__cordova/app/app.js?hash=1bf7a80f99ce5c4fe42cf2a3144b46fa8fe2915e: Line 107444 : blueimp Gallery: Widget container not found.
12-22 03:58:24.899 28337-28337/com.bs.don2 I/chromium: [INFO:CONSOLE(107444)] "blueimp Gallery: Widget container not found.", source: http://localhost:12648/__cordova/app/app.js?hash=1bf7a80f99ce5c4fe42cf2a3144b46fa8fe2915e (107444)
12-22 03:58:24.899 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/android/FileSystem.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.900 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/browser/isChrome.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.900 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/fileSystems-roots.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.901 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file/www/fileSystemPaths.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.902 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file-transfer/www/FileTransferError.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.905 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-file-transfer/www/FileTransfer.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.905 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-geolocation/www/android/geolocation.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.905 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-inappbrowser/www/inappbrowser.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.906 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-geolocation/www/PositionError.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.906 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-inapppurchase/www/index-android.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.916 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/CaptureAudioOptions.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.919 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/CaptureImageOptions.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.922 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/CaptureVideoOptions.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.926 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/CaptureError.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.927 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/MediaFileData.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.927 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/MediaFile.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.934 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/helpers.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.934 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/capture.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.935 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-media-capture/www/android/init.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.935 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-simple-image-resizer/www/image_resizer.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.937 28337-28392/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-video-editor/www/VideoEditor.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.937 28337-30266/com.bs.don2 W/MeteorWebApp: Asset /plugins/cordova-plugin-video-editor/www/VideoEditorOptions.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:24.942 28337-30259/com.bs.don2 W/MeteorWebApp: Asset /plugins/ionic-plugin-keyboard/www/android/keyboard.js not found in bundle 022e2e02a05f909d49370f1a58c42bf89473328c:file:///android_asset/www/application, no parent bundle
12-22 03:58:25.187 28337-28337/com.bs.don2 D/SystemWebChromeClient: http://localhost:12648/__cordova/app/app.js?hash=1bf7a80f99ce5c4fe42cf2a3144b46fa8fe2915e: Line 107444 : blueimp Gallery: Widget container not found.
12-22 03:58:25.187 28337-28337/com.bs.don2 I/chromium: [INFO:CONSOLE(107444)] "blueimp Gallery: Widget container not found.", source: http://localhost:12648/__cordova/app/app.js?hash=1bf7a80f99ce5c4fe42cf2a3144b46fa8fe2915e (107444)

Xcode Build Error

When trying to compile an iOS-App, I currently get a Build Failure due to this plugin.

Any help appreciated.

screen shot 2016-04-26 at 13 49 20

Android HCP fails with 1.6.3 and 1.6.2

Haven't tested iOS.

Problem behavior: when a change is made to the client, the app doesn't refresh. Occurs with 1.6.3 and 1.6.2. Does not occur with 1.6.0.

Repro:

meteor create hcp --release 1.8.1-beta.13
cd hcp
meteor add-platform android
meteor run android-device --mobile-server="http://wifi-ip:3000"

Once app has loaded, edit client/index.html. Then repeat with this in .meteor/cordova-plugins:

Output with 1.6.3:

https://gist.github.com/lorensr/4ef1d0b41e18b120b0a056a5473b26a9

The messages about "good version" and "skipping" make sense given the behavior: the initial version is fa7 and it for some reason skips downloading all new versions.

Output with 1.6.0:

=> Started your app.

=> App running at: http://localhost:3000/
=> Started app on Android Device.
I20190112-02:32:40.761(1)? I/CordovaLog( 4476): Changing log level to DEBUG(3)
I20190112-02:32:40.802(1)? I/chromium( 4476): [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
I20190112-02:32:40.803(1)? I/MeteorWebApp( 4476): Serving asset bundle with version: b8dedbc4919bb656a23a79e4cf1baafec6fd98db
I20190112-02:32:41.259(1)? I/MeteorWebApp( 4476): Serving asset bundle with version: 3c38e6e5055e8d3510b021a365416273b35abbb2
I20190112-02:32:42.537(1)? I/MeteorWebApp( 4476): Skipping downloading current version: 3c38e6e5055e8d3510b021a365416273b35abbb2
=> Client modified -- refreshingI20190112-02:33:28.681(1)? I/MeteorWebApp( 4476): Serving asset bundle with version: 3f2e595f0c1129230a4542ad24ef1c8faa2d43b8
I20190112-02:33:29.833(1)? I/MeteorWebApp( 4476): Skipping downloading current version: 3f2e595f0c1129230a4542ad24ef1c8faa2d43b8
=> Client modified -- refreshing (x2)I20190112-02:33:47.526(1)? I/MeteorWebApp( 4476): Serving asset bundle with version: ab005c1591509687bf4280f4b46639a114611c01
I20190112-02:33:48.687(1)? I/MeteorWebApp( 4476): Skipping downloading current version: ab005c1591509687bf4280f4b46639a114611c01

Output is weird. There are two different initial bundle versions, and it always skips, even though app is refreshing.

Fail on Android

In my application, i intercept the onNewVersionReady callback to notify user an update message with an OK button. If user click OK, I call the location.reload().

As my understand it works like this:

  1. Cordova notifies that new version is ready, and create a pendingAssetBundle.
  2. Somewhere in the webview, location.reload() is called.
  3. Cordova plugins call onReset(), the currentAssetBundle (old assets) is switched to pendingAssetBundle (new assets).
  4. Webview serving new assets as normal

But for our real experiment, 90% of the time it ends up with:

  1. Cordova notifies that new version is ready, and create a pendingAssetBundle.
  2. Somewhere in the webview, location.reload() is called.
  3. Cordova server index.html and some others of old assets (currentAssetBundle).
  4. Cordova plugins call onReset(), the currentAssetBundle (old assets) is switched to pendingAssetBundle (new assets).
  5. Webview serving new assets

This make the errors that index.html contained outdated minified js/css doesn't exists in new bundle, and new version got rollbacked every time.

So we end with a solution that exposing a function switchAssetBundle that switches asset bundles (current and pending). On callback of that function, we perform location.reload() and thats work.

Download failure: Error parsing asset manifest

Around 5% of the time (over 120 tests), HCP fails on Android with the below message. When I restart the app, the old version loads, and then it refreshes to the new version.

Versions: 1.6.0 (without the reattempt) and 1.6.3

=> Client modified -- refreshing (x32)I20190113-01:37:07.721(1)? W/MeteorWebApp(30776): Download failure
I20190113-01:37:07.721(1)? W/MeteorWebApp(30776): com.meteor.webapp.WebAppException: Error parsing asset manifest
I20190113-01:37:07.721(1)? W/MeteorWebApp(30776):       at com.meteor.webapp.AssetManifest.<init>(AssetManifest.java:80)
I20190113-01:37:07.721(1)? W/MeteorWebApp(30776):       at com.meteor.webapp.AssetBundleManager$1.onResponse(AssetBundleManager.java:112)
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776):       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776):       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776):       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776):       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776):       at java.lang.Thread.run(Thread.java:818)
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776): Caused by: org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776):       at org.json.JSON.typeMismatch(JSON.java:111)
I20190113-01:37:07.722(1)? W/MeteorWebApp(30776):       at org.json.JSONObject.<init>(JSONObject.java:160)
I20190113-01:37:07.723(1)? W/MeteorWebApp(30776):       at org.json.JSONObject.<init>(JSONObject.java:173)
I20190113-01:37:07.723(1)? W/MeteorWebApp(30776):       at com.meteor.webapp.AssetManifest.<init>(AssetManifest.java:39)
I20190113-01:37:07.723(1)? W/MeteorWebApp(30776):       ... 6 more
I20190113-01:37:07.723(1)? E/MeteorWebApp(30776): Download failure
I20190113-01:37:07.723(1)? E/MeteorWebApp(30776): com.meteor.webapp.WebAppException: Error parsing asset manifest
I20190113-01:37:07.723(1)? E/MeteorWebApp(30776):       at com.meteor.webapp.AssetManifest.<init>(AssetManifest.java:80)
I20190113-01:37:07.724(1)? E/MeteorWebApp(30776):       at com.meteor.webapp.AssetBundleManager$1.onResponse(AssetBundleManager.java:112)
I20190113-01:37:07.724(1)? E/MeteorWebApp(30776):       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at java.lang.Thread.run(Thread.java:818)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776): Caused by: org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at org.json.JSON.typeMismatch(JSON.java:111)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at org.json.JSONObject.<init>(JSONObject.java:160)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at org.json.JSONObject.<init>(JSONObject.java:173)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       at com.meteor.webapp.AssetManifest.<init>(AssetManifest.java:39)
I20190113-01:37:07.725(1)? E/MeteorWebApp(30776):       ... 6 more
I20190113-01:37:07.728(1) (android:http://localhost:12640/__cordova/packages/webapp.js:37) Error: Error parsing asset manifest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.