Some build errors


#1

Been off working on native iOS code the last year or so. Had to push some updates to our Trigger-based app. Loaded it up and got going…

Latest iOS, latest MacOS, latest XCode, iPhone XR. All trigger modules updated to latest version. Platform at latest.

Kinda dead in the water here with some show-stopping issues. At least this first one totally is.

Any help offered is greatly appreciated. Thanks!

Problem 1:
Won’t launch app to index.html, and instead, tries to open the file in Safari, then overlays a popup saying “Safari cannot open the page because the address is invalid.” Again, this is just trying to load up index.html in the app’s source directory. It actually DOES load the page (in mobile safari, not inside app), but still errors out. App remains on launch image.

None of what I could find via Google was helpful, and the apparently non-world-endingly-dangerous things I did try in those didn’t resolve anything.

Problem 2: Can’t launch in simulator
[ERROR] Failed to launch app in simulator
[ERROR] generate_dynamic.ios_sim
[ERROR] Could not locate simulator for: com.apple.CoreSimulator.SimDeviceType.iPhone-XR None - Please check your Xcode and iOS simulator setup

Simulator launches and runs fine from XCode

Problem 3: Can’t launch on device
[DEBUG] [ 95%] Developer disk image mounted successfully

[DEBUG] Unable to locate DeviceSupport directory with suffix ‘Symbols’. This probably means you don’t have Xcode installed, you will need to launch the app manually and logging output will not be shown!

[DEBUG] Failed to run /Users/chris/code/diaryApp/.lib/ios-deploy -d -u -t 60 -I -b /Users/chris/code/diaryApp/development/ios/device-ios.app, but was told to carry on anyway

Debugging on device works fine from XCode.


Platforms:
ChrisMbP:DeviceSupport chris$ ls -l
total 0
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 10.0
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 10.1
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 10.2
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 10.3
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 11.0
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 11.1
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 11.2
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 11.3
drwxr-xr-x 4 root wheel 128 Apr 18 05:21 11.4
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 12.0
drwxr-xr-x 4 root wheel 128 Apr 18 05:21 12.1
drwxr-xr-x 4 root wheel 128 Apr 18 05:21 12.2 (16E226)
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 8.0
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 8.1
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 8.2
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 8.3
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 8.4
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 9.0
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 9.1
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 9.2
drwxrwxr-x 4 root wheel 128 Apr 18 05:21 9.3
lrwxr-xr-x 1 root wheel 13 Apr 24 10:09 Latest -> 12.2 (16E226)

config file (… redacted a few things because I guess I should):
{
“config_version”: “4”,
“name”: “…”,
“author”: "development@greenlinebusinessgroup.com",
“version”: “27”,
“platform_version”: “v2.7.6”,
“description”: “Peace of mind in real time”,
“core”: {
“android”: {
“disable_ics_acceleration”: true,
“package_name”: “com.greenlinebusinessgroup.danionotifier”
},
“ios”: {
“package_name”: “com.greenlinebusinessgroup.danionotifier”,
“webview”: “WKWebView”,
“bounces”: true,
“adjust_content_insets”: “always”,
“device_family”: “iphone”,
“minimum_version”: “12.0”
},
“general”: {
“logging”: {
“level”: “INFO”
},
“trusted_urls”: [
http://localhost/*
]
}
},
“modules”: {
“pushwoosh”: {
“version”: “3.4.0”
},
“topbar”: {
“version”: “2.15”,
“config”: {
“statusBarStyle”: “UIStatusBarStyleDefault”
}
},
“icons”: {
“version”: “2.9”,
“config”: {
“android”: {
“48”: “icons/48.png”,
“72”: “icons/72.png”,
“96”: “icons/96.png”,
“144”: “icons/144.png”,
“192”: “icons/192.png”
},
“ios”: {
“57”: “icons/icon-57.png”,
“72”: “icons/icon-72.png”,
“76”: “icons/icon-76.png”,
“114”: “icons/icon-114.png”,
“120”: “icons/icon-120.png”,
“144”: “icons/icon-144.png”,
“152”: “icons/icon-152.png”,
“167”: “icons/icon-167.png”,
“180”: “icons/icon-180.png”,
“1024”: “icons/icon-1024.jpg”
}
}
},
“launchimage”: {
“version”: “2.13”,
“config”: {
“ios”: {
“wC_hR”: “launchimages/bubbles-still-port_1080x1920.jpg”,
“wC_hC”: “launchimages/bubbles-still-land_1334x750.jpg”,
“wR_hC”: “launchimages/bubbles-still-land_1920x1080.jpg”,
“wR_hR”: “launchimages/bubbles-still-port_2732x2048.jpg”
},
“android”: {
“portrait”: “launchimages/bubbles-still-port_2732x2048.jpg”,
“landscape”: “launchimages/bubbles-still-land_1920x1080.jpg”,
“background-color”: “#000000”,
“background-size”: “cover”
},
“hide-manually”: true
}
},
“notification”: {
“version”: “2.8”
},
“prefs”: {
“version”: “2.2”
},
“request”: {
“version”: “2.10.1”,
“config”: {}
},
“httpd”: {
“version”: “1.4”,
“config”: {}
}
},
“homepage”: “…”
}


#2

Update: I can get the app to run without error #1 now. The overlay/popup that disables Safari, I mean.

But it still opens index.html in Safari, and with no styling or script, so clearly there’s maybe a scoping or access problem anyway. This is reverting back to original code, but with current modules.

Why in the world would index.html load external to the app in Safari?

If I can at least get that resolved, I can deal with the debugging issue later.

Thanks.


#3

All things I have had happen :slight_smile: For the most part I think…

Anyhow as mentioned in the post about httpd, if you try and remove https it should work…

For the simulator, this is one that other have reported and there does not seem to be an official ‘fix’ however you can always run your build and drag and drop the ipa from the development directory. This should install on the device for testing, again as noted in the previous post, you wont get the debug console from forge but safari debug will work still

Hope this helps.


#4

So we just don’t get debugging any more, and that’s that…? (sigh)

Bummer.

I despise coding for Android with a fiery passion, like unto Iron Fist punching me square in the jimmies, but I would do it if it means getting proper debugging. :frowning:


#5

Usually when there are problems with iOS simulators it comes down to Xcode installation issues.

That said, the forge related issues to check for are in your local_config.json file:

  • Have you specified a valid provisioning profile?
  • Are you using the devicesdk setting appropriate for the version of Xcode installed? The latest version of Xcode is 10.2.1 and it ships with simulators for iOS 12.2
  • Does a simulator exist for the device you are requesting?

As an example, the iOS section of my working local_config.json looks like this:

{
 "ios": {
        "profiles": {
            "DEFAULT": {                
                "provisioning_profile": "/path/to/my/wildcard/provisioning_profile.mobileprovision"
            }
        },
        "device": "device",
        "devicesdk": "iOS 12.2",
        "devicetypeid": "com.apple.CoreSimulator.SimDeviceType.iPhone-XR"
    },
    ...

#6

Due to the ongoing war on http:// and the slightly different velocities of iOS and Android the config for the httpd module is a bit more complex than it should be right now.

I’ve put together a working src/config.json file (and bonus certificate!) for the httpd module which can be found here:

The next major release of the httpd module will use https:// by default which will go a long way towards simplifying configuration.


#7

That said, the forge related issues to check for are in your local_config.json file:

  • Have you specified a valid provisioning profile?
  • Are you using the devicesdk setting appropriate for the version of Xcode installed? The latest version of Xcode is 10.2.1 and it ships with simulators for iOS 12.2
  • Does a simulator exist for the device you are requesting?

I’d love to be able to respond saying, “Aha!”, but alas… no joy. I have (re)(re)(re)verified all versions, etc., and it’s just not attaching to either the simulator (version 10.2.1 running 12.2) nor my iPhone XR connected with an actual Apple USB-C to Lightning cable, running 12.2.

Connecting through XCode and debugging works fine.

Here’s my current config section for simulator:
“ios”: {
“profiles”: {
“DEFAULT”: {
“provisioning_profile”: “/Users/chris/code/diaryAppFiles/diary_dev.mobileprovision”,
“developer_certificate_path”: “/Users/chris/code/DanioDiaryCerts/ios_distribution.cer”,
“developer_certificate_password”: “Spaceballs123456”
}
},
“devicesdk”: “iOS 12.2”,
“devicetypeid”: “com.apple.CoreSimulator.SimDeviceType.iPhone-XR”,
“device”: “simulator”,
“simulatorvariant”: “retina”

The only difference for on-device debugging ends up being “device”:“device”.

When trying to debug on the device, it installs and kills any running process like norm, but won’t proceed, and emits:

[DEBUG] [ 95%] Developer disk image mounted successfully

[DEBUG] Unable to locate DeviceSupport directory with suffix ‘Symbols’. This probably means you don’t have Xcode installed, you will need to launch the app manually and logging output will not be shown!

[DEBUG] Failed to run /Users/chris/code/diaryApp/.lib/ios-deploy -d -u -t 60 -I -b /Users/chris/code/diaryApp/development/ios/device-ios.app, but was told to carry on anyway

How do I verify ios-deploy is current and proper?

Thanks.


#8

PS… I WANT to be very wrong in this and I HOPE I’ve just missed something silly… or obvious.


#9

Also check that you are a) latest version of Xcode and b) latest version of iOS on your hardware device. Apple’s command line tools stopped working when the two don’t match a year or so ago. Note that point versions started mattering recently as well. iOS 12.2 is not the same as 12.2.1.


#10

Yep, same across the board. 12.2 :frowning:


#11

Whoo boy…

Looks like Apple, once again, decided to randomly change the format of the simulator registry. Devices are now keyed by runtime identifier rather than runtime name. :face_with_raised_eyebrow:

I’ve pushed a fix to v2.7.8:

https://trigger.io/docs/current/api/release_notes.html


#12

Will update immediately. Thanks!


#13

Given the changes, do you know the actual string to add to the config file now in order to properly activate the simulator for iOS? Thanks much.


#14

Fix was on our code side, your config should work fine as it was.

e.g. Here’s what my own local_config.json contains:

"device": "simulator",
"devicesdk": "iOS 12.2",
"devicetypeid": "com.apple.CoreSimulator.SimDeviceType.iPhone-8"

#15

YAY!!!

Thanks!

I also FINALLY figured out how to TRULY uninstall Java 12 (don’t believe anything you read on the Internet) and got 8 reinstalled and working as the live version ( 12 seems tenacious ). None of my resources like images and such are rendering on Android, but I wonder if that’s a problem with relative path names in the HTML. For now, I can test on the Apple Simulator, and I can continue to navigate in the app since removing HTTPD.

thanks!


#16

I assume this is strictly an issue of how I have my Android emulator set up, or the build file being too big or something? (the boss insisted on a few way-too-big graphics files).

Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]


#17

Last thing… the XR doesn’t seem to work from the drop-down selection of emulators in the web UI.

I edited the file directly to switch the “r” between uppercase and lower case (the new apple emulator shows it as a lower case on the frame), but to no avail. The X works. XS and XS-Max also seem not to work. X is fine for me as it lets me verify screen layout for that series. Just wasn’t sure if you were aware.

Thanks!