You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "leonelgregioauler (via GitHub)" <gi...@apache.org> on 2025/06/30 15:19:20 UTC

[D] Camera "crashing" on iOS [cordova]

GitHub user leonelgregioauler created a discussion: Camera "crashing" on iOS

Hi !

I have a problem on using camera into iOS. On button click the app crashes and close without appearing any error.

I know that into iOS Simulator the camera doesn't open, but even I clicked and printed the error. I think this error can be used to identify my problem.

On simulator, the code should return this.onFail function ? 

![image](https://github.com/user-attachments/assets/e5ebc5ed-3ff3-499d-81d8-a92db4880eb3)

On debug, the app crashes after executes navigator.camera.getPicture

![image](https://github.com/user-attachments/assets/5d20d9ce-f7ac-47e0-a337-6a374efae46c)

Plugins installed

![image](https://github.com/user-attachments/assets/d45cdb76-f54e-4119-9bfa-7d2312d74354)




GitHub link: https://github.com/apache/cordova/discussions/551

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [D] Camera "crashing" on iOS [cordova]

Posted by "leonelgregioauler (via GitHub)" <gi...@apache.org>.
GitHub user leonelgregioauler edited a discussion: Camera "crashing" on iOS

Hi !

I have a problem on using camera into iOS. On button click the app crashes and close without appearing any error. (physically iOS and Simulator)

I know that into iOS Simulator the camera doesn't open, but I think it shouldn't generate this error. So, I think this error can be used to identify my problem.

On simulator, the code should return this.onFail function ? 

![image](https://github.com/user-attachments/assets/e5ebc5ed-3ff3-499d-81d8-a92db4880eb3)

On debug, the app crashes after executes navigator.camera.getPicture, without catching this.onFail funcion.

![image](https://github.com/user-attachments/assets/5d20d9ce-f7ac-47e0-a337-6a374efae46c)

Plugins installed

![image](https://github.com/user-attachments/assets/d45cdb76-f54e-4119-9bfa-7d2312d74354)

Config.xml

![image](https://github.com/user-attachments/assets/049166a8-22ed-4af2-a087-63c0ebba30c0)





GitHub link: https://github.com/apache/cordova/discussions/551

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [D] Camera "crashing" on iOS [cordova]

Posted by "leonelgregioauler (via GitHub)" <gi...@apache.org>.
GitHub user leonelgregioauler edited a discussion: Camera "crashing" on iOS

Hi !

I have a problem on using camera into iOS. On button click the app crashes and close without appearing any error.

I know that into iOS Simulator the camera doesn't open, but even I clicked and printed the error. I think this error can be used to identify my problem.

On simulator, the code should return this.onFail function ? 

![image](https://github.com/user-attachments/assets/e5ebc5ed-3ff3-499d-81d8-a92db4880eb3)

On debug, the app crashes after executes navigator.camera.getPicture

![image](https://github.com/user-attachments/assets/5d20d9ce-f7ac-47e0-a337-6a374efae46c)

Plugins installed

![image](https://github.com/user-attachments/assets/d45cdb76-f54e-4119-9bfa-7d2312d74354)

Config.xml

![image](https://github.com/user-attachments/assets/049166a8-22ed-4af2-a087-63c0ebba30c0)





GitHub link: https://github.com/apache/cordova/discussions/551

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [D] Camera "crashing" on iOS [cordova]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
GitHub user breautek added a comment to the discussion: Camera "crashing" on iOS

This is probably worth actually raising a new issue in the camera plugin repo: https://github.com/apache/cordova-plugin-camera/issues

GitHub link: https://github.com/apache/cordova/discussions/551#discussioncomment-13620188

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [D] Camera "crashing" on iOS [cordova]

Posted by "BigBalli (via GitHub)" <gi...@apache.org>.
GitHub user BigBalli added a comment to the discussion: Camera "crashing" on iOS

How are you calling capturePhoto?
NSInvalidArgumentException usually means you're passing something that is of wrong type (eg int instead of string).
using this.onFail might also be fragile, define it explicitly to see if it works.


GitHub link: https://github.com/apache/cordova/discussions/551#discussioncomment-13620633

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [D] Camera "crashing" on iOS [cordova]

Posted by "leonelgregioauler (via GitHub)" <gi...@apache.org>.
GitHub user leonelgregioauler added a comment to the discussion: Camera "crashing" on iOS

The problem is on parameter:

cameraDirection: 'BACK'

This parameter cannot be used, only for Android. 
The default is "BACK" so this parameter doesn't need to be used for any platform.

Thank you guys !!

GitHub link: https://github.com/apache/cordova/discussions/551#discussioncomment-13621182

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [D] Camera "crashing" on iOS [cordova]

Posted by "leonelgregioauler (via GitHub)" <gi...@apache.org>.
GitHub user leonelgregioauler closed a discussion: Camera "crashing" on iOS

Hi !

I have a problem on using camera into iOS. On button click the app crashes and close without appearing any error. (physically iOS and Simulator)

I know that into iOS Simulator the camera doesn't open, but I think it shouldn't generate this error. So, I think this error can be used to identify my problem.

On simulator, the code should return this.onFail function ? 

![image](https://github.com/user-attachments/assets/e5ebc5ed-3ff3-499d-81d8-a92db4880eb3)

On debug, the app crashes after executes navigator.camera.getPicture, without catching this.onFail funcion.

![image](https://github.com/user-attachments/assets/5d20d9ce-f7ac-47e0-a337-6a374efae46c)

Plugins installed

![image](https://github.com/user-attachments/assets/d45cdb76-f54e-4119-9bfa-7d2312d74354)

Config.xml

![image](https://github.com/user-attachments/assets/049166a8-22ed-4af2-a087-63c0ebba30c0)





GitHub link: https://github.com/apache/cordova/discussions/551

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [D] Camera "crashing" on iOS [cordova]

Posted by "leonelgregioauler (via GitHub)" <gi...@apache.org>.
GitHub user leonelgregioauler edited a comment on the discussion: Camera "crashing" on iOS

The problem is on parameter:

cameraDirection: 'BACK'

This parameter cannot be used, only for Android. 
The default is "BACK" so this parameter doesn't need to be used for any platform.

![image](https://github.com/user-attachments/assets/5811c0e6-32cf-44cd-9ee2-fabb9939f055)


Thank you guys !!

GitHub link: https://github.com/apache/cordova/discussions/551#discussioncomment-13621182

----
This is an automatically sent email for issues@cordova.apache.org.
To unsubscribe, please send an email to: issues-unsubscribe@cordova.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org