Coder Social home page Coder Social logo

RedBear Duo App crashes with iOS v11 about duo HOT 10 OPEN

redbear avatar redbear commented on June 5, 2024
RedBear Duo App crashes with iOS v11

from duo.

Comments (10)

OhHeyAlan avatar OhHeyAlan commented on June 5, 2024

Doesn’t work for me on iOS 11.2.6
The app just crashes.

from duo.

saamerm avatar saamerm commented on June 5, 2024

I'm not that adept in Swift (just C#) but I tried to clone the project and see where the exception occurs, and I got

"Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value"

around line 666 (number may be greater than actual because of my comments) of the DuoWifiProvisioningViewController file at this call "alert.addAction(self.passAlertAction!)"

The self.passAlertAction is null and I tried to follow https://stackoverflow.com/questions/32170456/what-does-fatal-error-unexpectedly-found-nil-while-unwrapping-an-optional-valu but I have no idea what he's saying

Not a 100% sure what I can do about it, any ideas @Cheong2K @OhHeyAlan @XuGuohui or @ChiHung ?
This issue has made my RedBear Duo useless 😿

from duo.

Danappelxx avatar Danappelxx commented on June 5, 2024

It looks like the issue is that self.passAlertAction is weak but is assigned to directly from allocation. As such it is immediately deallocated and afterwards crashes when unwrapped, at least some of the time (undefined behavior unfortunately). The fix for this is straightforward - simply allocate it on the stack and then pass ownership to the alert. I'll submit a pull request.

from duo.

Danappelxx avatar Danappelxx commented on June 5, 2024

Made the pull request. Let's hope it gets merged! @saamerm I would appreciate if you could test it to make sure my theory is correct.

from duo.

saamerm avatar saamerm commented on June 5, 2024

Verified! @Danappelxx 's PR fixes the crash.
To test it/use a working copy:

  1. you need a Mac with xcode,
  2. then clone his Duo repo, switch to the right branch
  3. Change the bundle identifier and the provisioning profile to random test stuff,
  4. Connect your phone and Build

from duo.

wywarren avatar wywarren commented on June 5, 2024

I cloned the repo but I'm getting an error with the link to Pods_RedBear_Duo.framework . Do I need to build the pods framework separately first? If so how? I do see the pods folder in the iOS project folder but it's just a bunch of nested frameworks inside another project. I suspect the SparkSetup error I'm getting is related to this missing framework?

Thanks for any help you guys can provide. I'm also on iOS 11 and the app store app is crashing on me.

from duo.

saamerm avatar saamerm commented on June 5, 2024

@wywarren Hey Warren
Im not sure why you are getting that error :/
Did you open the workspace and do you have the latest version of Xcode installed?

from duo.

Danappelxx avatar Danappelxx commented on June 5, 2024

@wywarren you need to download cocoapods (gem install cocoapods) and run pod install, and then everything should build.

from duo.

wywarren avatar wywarren commented on June 5, 2024

I ended up opening the DuoApp xcode project and then dragging the Pods excode project file into the DuoApp's project and everything built as expected. I also ran the cocoapods as @Danappelxx suggested. Not sure if that helped it as well. But it got rid of the SparkSetup error as the source code was actually in the project now. Time to continue tinkering. Thanks for the help guys.

from duo.

wywarren avatar wywarren commented on June 5, 2024

Just a note: The commenting on DuoBLEProvisionTableViewController.swift should have the filename fixed on line #3
// DuoWifiProvisionTableViewController.swift
This caused a bit of confusion for me thinking I was editing the wrong file at one point.

But yes after updating the Wifi and BLE swift files everything seems to build and not crash now.

from duo.

Related Issues (20)

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.