ModalJS - Index was out of range exception with Fuse 0.36.1

When I try to run this ModaJS.uno code:

Modal.showModal(
                    "Oops :(",
                    errorMessage,
                    ["I got it"],
                    function (buttonPressed) {
                        //debug_log("Got callback with " + buttonPressed);
                    });

from https://github.com/bolav/fuse-modalview (.uno file: https://github.com/bolav/fuse-modalview/blob/master/ModalJS.uno) under Fuse 0.36.1 version, I get this exception

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at Fuse.Scripting.V8.Context.ThrowPendingExceptions () <0x1b7638a8 + 0x0003f> in <filename unknown>:0 
  at Fuse.Scripting.V8.Function.Call (System.Object[] args) <0x1b765950 + 0x0029f> in <filename unknown>:0 
  at Fuse.Reactive.FunctionMirror+CallClosure.Call () <0x1b7e8dd0 + 0x002e1> in <filename unknown>:0 
  at Fuse.Reactive.ThreadWorker.RunInner () <0x1b761578 + 0x0039f> in <filename unknown>:0 

It was working very well two months ago (with Fuse 0.34). Maybe its a version issue…

Any suggestion?

Hi Leandro,

the problem is clearly with the community package. Because of that, there’s two suggestions:

  1. Open the compiled project in Android Studio and debug it there (should give you exact line where the problem occurs, then you can fix the corresponding code in ModalJS.uno). You can launch Android Studio by running uno build -adebug -tandroid in project root.
  2. Submit an issue on the repo and then very politely approach @bolav on slack community.

We just recently fixed this.

Mitesh, would it be possible for you to share the solution?