foysalit / rn-tutorial-vedo

React Native App that mimics whatsapp's camera UI
41 stars 29 forks source link

trouble in camera.page.js #1

Open cmiller0352 opened 5 years ago

cmiller0352 commented 5 years ago

lines 60 and 61 in camera.page.js throw an error

type={cameraType} flashMode={flashMode}

When i remove these, I can run the app, with them, i get thrown an error.

Love the tutorial!! Thanks for the help!!

foysalit commented 5 years ago

Hey @cmiller0352 can you post the error you get? last I checked, expo still supports those props. not sure why it would throw an error? are you running a clone of the repo? if not, may be you didn't get those variables from state?

cmiller0352 commented 5 years ago

Sure thing. I’ll send it tonight when I get to my computer. I did clone it, when that didn’t work, I went line by line with your tutorial, that’s when I found those two lines were the source of the problem.

Thanks for responding! And the great tutorial. I’m working on a project for my final at coding bootcamp. Your tutorial helped immensely!

On Sat, Mar 30, 2019 at 1:34 PM Foysal Ahamed notifications@github.com wrote:

Hey @cmiller0352 https://github.com/cmiller0352 can you post the error you get? last I checked, expo still supports those props. not sure why it would throw an error? are you running a clone of the repo? if not, may be you didn't get those variables from state?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/foysalit/rn-tutorial-vedo/issues/1#issuecomment-478275328, or mute the thread https://github.com/notifications/unsubscribe-auth/AsTTaykZRa7FkeFhsoextQVfYIWJMk6Eks5vb65IgaJpZM4cRigv .

mistermjtek commented 5 years ago

Same issue as @cmiller0352 - the error that's thrown is the following:

Exception thrown while executing UI block: - [NSNull longValue]: unrecognized selector sent to instance 0x11aceaf28

@cmiller0352's solution to remove those two lines does work for me

foysalit commented 5 years ago

Thanks y'all for reporting the issue. Those are features of the app and by removing them you lose the ability to toggle front/back camera and flash mode so is not exactly a solution. I should have tested the end product on iOS cause this is not an issue on android. Turns out, those values can not be null on iOS which is what i set in the initial state. I pushed the fix, check it out here: https://github.com/foysalit/rn-tutorial-vedo/commit/24ad113aee510d74006d14dfca8ad844c3fbe3e2

I'll update my post as well, thanks again for reporting it. @cmiller0352 @mistermjtek