corellium-api icon indicating copy to clipboard operation
corellium-api copied to clipboard

Agent.network(): Unknown operation 'network' in system message request

Open rvbiljouw opened this issue 3 years ago • 0 comments

It appears that the Agent.network() function defined here doesn't work.

Upon calling it an error is thrown: InvalidArgument: Unknown operation 'network' in system message request

It occurs with this test script

import {Corellium} from "@corellium/corellium-api";

async function main() {
    let corellium = new Corellium({
        endpoint: "https://app.corellium.com",
        apiToken: process.env["CORELLIUM_API_KEY"]
    });

    await corellium.login();

    let project = await corellium.projectNamed("Default Project");
    let instance = await project.getInstance(process.env["CORELLIUM_DEVICE_ID"]);
    const agent = await instance.newAgent();
    await agent.ready();

    let network = await agent.network();
    console.log(network);

    agent.disconnect();
}

main().catch((err) => {
    console.error(err);
});

rvbiljouw avatar Nov 23 '22 19:11 rvbiljouw