Not allowed to launch cutom protocol because a user gesture is required

Discussão em 'Angular' iniciado por Fatma, Março 5, 2025.

  1. Fatma

    Fatma Guest

    I need to run my custom protocol twice but it doesn't work the second time, I got this error ( Not allowed to launch 'cutomProtocol' because user gesture is required. ) I tried to find a solution but I did not find any!

    Same problem with chrome, firefox and edge.

    [​IMG]

    I need to see this popup twice [​IMG]

    window.location.href = 'my-protocol://${base64}';

    and

    customProtocolVerify(
    `my-protocol://${base64}`,
    () => {
    // successCb: Callback function which gets called when custom protocol is found.
    console.log('My protocol found and opened the file successfully..');
    },
    () => {
    // failCb: Callback function which gets called when custom protocol not found.
    console.log('My protocol not found.');
    }
    );


    I tried with these two and didn't work

    Clarification

    I have a custom protocol.

    My scenario:

    1. check if it's installed successfully (I'm using customProtocolVerify method) and that method makes the launch if the protocol is found
    2. run some APIs
    3. launch the protocol again

    My problem:

    Step 3 doesn't work, I have the error on the console that says " Not allowed to launch... " and of course I can't see my popup to open my protocol.

    I'm asking for help to make step 3 work

    Continue reading...

Compartilhe esta Página