question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOs build fails - UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined

See original GitHub issue

Bug Report

Problem

Since the last xCode update to version 11.0, I can’t make any build for iOs, it throws this error in the process. Any enlightenment on this would be helpful.

What does actually happen?

(node:3043) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:54:45 at Array.forEach (<anonymous>) at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:52:44 at Array.reduce (<anonymous>) at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:50:57 at Array.reduce (<anonymous>) at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/lib/list-emulator-build-targets:45:28 at _fulfilled (/Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/node_modules/q/q.js:854:54) at /Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/node_modules/q/q.js:883:30 at Promise.promise.promiseDispatch (/Users/username/Documents/petpo-fe-mobile-bugs/platforms/ios/cordova/node_modules/q/q.js:816:13) (node:3043) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:3043) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

9reactions
tgomezccommented, Sep 26, 2019

Well, finally solve this out. This may help other people as the xcode update is really new and there isn’t much info about this. I was using iOS platform v4.5.4. Apparently xcode 11 has some conflict with a validation in the file list-emulator-build-targets. What you have to do is this: -remove ios platform from Cordova -excute command: ionic cordova platform add ios@latest

This will install ios v5.0.1 which works out fine with xcode 11.

2reactions
dpoguecommented, Sep 27, 2019

We are tied to cordova-ios v4 for now, so updating to v5 is not an option for us. Is it possible to get this patch in v4 as v4.5.6?

cordova-ios v4.x is no longer supported or maintained.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UnhandledPromiseRejectionWar...
iOs build failing - UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toLowerCase' of undefined.
Read more >
iOS: Cannot read property 'toLowerCase' of undefined - ionic-v3
But now I'm getting this error: Reading build config file: Cannot read property 'toLowerCase' of undefined. With this solution:
Read more >
Cannot read property 'toLowerCase' of Undefined in JS
The "Cannot read property 'toLowerCase' of undefined" error occurs when calling the toLowerCase() method on an undefined value. To solve the error, ...
Read more >
Cannot read property 'toLowerCase' of undefined - Bugs
I am just checking out Wappler and tried one simple thing: Create a new project from the Mobile Template Added iOS 4.5.5 from...
Read more >
Cannot read property tolowercase of undefined node js
The "Cannot read property 'toLowerCase' of undefined" error occurs when calling ... (node) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found