Scott H Tech Firebase Database stopListener() Crashes

Hi @Scott_Harrison,

I am using the Firebase Database Plugin (1.9) and building with the latest Solar2D build : 2024.3709 (2024.8.19).

Every time I call firebaseDatabase.stopListener() and the App crashes.

This issue occurs only on the iOS platform, not on Android.

sample code:


    firebaseDatabase.startListener('/path/1', function(e)
    end)

    timer.performWithDelay(5000, function()
        firebaseDatabase.stopListener()
    end)

The error in the device log is as follows:


ERROR: Runtime error

NSInvalidArgumentException: -[__NSMallocBlock__ removeObserverWithHandle:]: unrecognized selector sent to instance 0x3031de7c0

(

    0   CoreFoundation                      0x000000018e8c4f2c 00E76A98-210C-3CB5-930B-F236807FF24C + 540460

    1   libobjc.A.dylib                     0x00000001867d6018 objc_exception_throw + 60

    2   CoreFoundation                      0x000000018e9ce480 00E76A98-210C-3CB5-930B-F236807FF24C + 1627264

    3   CoreFoundation                      0x000000018e861fb4 00E76A98-210C-3CB5-930B-F236807FF24C + 135092

    4   CoreFoundation                      0x000000018e8618d0 _CF_forwarding_prep_0 + 96

Any help would be appreciated.

Thank you.

Will take a look when I get a chance
Thanks
Scott