frida/frida-gum

frida rpc TypeError: cannot read property 'then' of null

mr-m0nst3r opened this issue · 2 comments

error msg:

TypeError: cannot read property 'then' of null
    at   (frida/runtime/message-dispatcher.js:14)
    at c (frida/runtime/message-dispatcher.js:23)

rpc:

setTimeout(()=>{

    rpc.exports = {
        dec: function(data) {
            let res = null
            Java.perform(()=>{
                let instance = null
                Java.choose("xxxx.SecurityManager", {
                    onMatch: function(x) {
                        // console.log("GetAESKey", x.getAesKey())
                        instance = x
                    },
                    onComplete: function(x) {}
                })
                res = instance.decypt(data)
            })
            return res
        },
        enc: function(data) {
            let res = null
            Java.perform(()=>{
                let instance = null
                Java.choose("xxxx.SecurityManager", {
                    onMatch: function(x) {
                        console.log("GetAESKey", x.getAesKey())
                        instance = x
                    },
                    onComplete: function(x) {}
                })
                res = instance.encypt(data)
            })
            return res
        },
    };
},5000)

frida: frida-14.2.3
frida-tools: frida-tools-9.1.0
python: python3.9

I'm rolling back to frida 12.11.18 to test.

I got the same problem.

Frida: 14.2.13
Frida-tools: 9.2.2
python: python3.7

Thanks for reporting! Fix will be included in Frida 15.1.15, to be released soon.