[cannot enable open channel] webhook has been well established but still cannot ennale open channel

Dear airship support team,

I am currently learning how to use your open channel to send notifications to my phone. But I encountered an error and couldn't carry on. Here is the issue detail:

1. I have established a webhook according to the your guide.

when i request <webhook_url>/validate, i can get the valid response.

2.But when i enable the new open channel on your website, i got http 500 error:

when i open the chrome development tool with F12, I got this hint:

 

Since i don't know what is the root problem, I don't what should I do next. Plz help.

Kind regards,

Mikko

Didn't find what you were looking for?

New post

Comments

17 comments

  • Hi Mikko,

    Jay from Technical Support here. We'd be happy to take a look.

    What's the App Key for your project? 

    And would you be able to share your code and what your webhook is returning in response?

    Thanks,

    Jay M.
    Airship Technical Support

    Comment actions Permalink
  • Hi Jay,

    thanks very mach for your reply. Below is the information you requested in your response:

    1)App Key:oDloRXtjROODBQKwfzJxbA

    2)  Validation Code:

    3) what webhook is returning in response:

    Please help to further confirm the cause of the problem,Thanks.

    Mikko Cheng.

    Comment actions Permalink
    0
  • Hey Mikko,

    When I try to validate on my end, your server isn't returning anything, which I assume is likely that you have to run it when you test and it isn't always on perhaps. If that isn't the case, let me know. 

    Otherwise, I'd recommend making sure that your validation response includes the following:

    • Return a 200 response code.
    • Return a Content-Type of "application/json".
    • Return a JSON body with the confirmation code in the following format: {"confirmation_code":"bf93d646-c8ff-42c9-8de2-86519880581c"}.

    Be sure that the body is valid JSON and returns the confirmation_code generated for the webhook in the Airship Dashboard.

    I've seen cases where the return body wasn't formatted correctly and while it looks fine in postman, it wasn't proper JSON or had incorrect charecters. 

    Comment actions Permalink
    0
  • Hi Jay,

    1) Although my webhook sometimes stops automatically, every time I click the "enable" button on the open channel configuration page, I can confirm that the webhook is running.

    2) Return a 200 response code—— √

    3)Return a Content-Type of "application/json".—— √

    4)Return a JSON body with the confirmation code in the following format: {"confirmation_code":"bf93d646-c8ff-42c9-8de2-86519880581c"}.—— √

     

    Everything looks good. And also I verified the returned body with a tool, and it turned out that it was a valid JSON string. 

    In addition, the value of the confirmation_code in the body is the same as that generated by the airship.

    Also, I changed the webhook url. The next time you try to call this API, remember to add port 8080 to the end of the original URL. Also, I changed the webhook url. The next time you try to call this API, remember to add port 8080 at the end of the original URL, that is, https://www.jrr.ink:8080. I will keep my server running for the next few days.

    Kind regards.

    Comment actions Permalink
    -1
  • I'm still unable to connect to the server, even with the https://www.jrr.ink:8080 url. 

    Can you verify the server is active?

    Also, would you be able to share the code your webhook uses to generate the response?

    Thanks,

    Jay M.
    Airship Technical Support

    Comment actions Permalink
    0
  • Hey Jay,

    1)I'm sorry the server is not running again. Now I have completely solved the problem. From now on, the server will always be running.

    2)Below is the code my webhook uses to  to generate the response.

     

    Comment actions Permalink
    0
  • Thanks for sending your code.

    I am still unable to connect, it is now timing out. Is this running locally? I'm also curious about the use of the port. 

     

    Comment actions Permalink
    0
  • Hi Jay,

    My webhook is running on a AWS EC2 instance not local. 

    As for the port, I  can normally access the validate interface without adding the port after the URL before, but I still cannot enable the open channel at that time.

    Comment actions Permalink
    0
  • Hi Jay,

    I am a colleague of Mikko. We are trying to use Airship, please deal with the questions raised by Mikko.

    Best regards,

    Super Song

    Comment actions Permalink
    0
  • Hey folks,

    I have just created a new webhook of my own to test this and I am able using postman to get a response from it (as well as enable the open channel in Airship) whereas I am still unable to get a response from your server using the exact same call just changing the domain to your webhook url (with or without the port). 

    That indicates that something about how the server is set up or what it's response is not set up correctly. 

    You can test this by setting up a test webhook with another service (like https://beeceptor.com/). 

    Jay M.
    Airship Technical Support

    Comment actions Permalink
    0
  • Hey Jay,

    We migrated the webhook software to another German server and everything worked fine. The problem has now been resolved. Thank you very much for your patience during this time.

    Thank you!

    Comment actions Permalink
    0
  • Wonderful! I'm glad to hear it's working.

    Jay M.
    Airship Technical Support

    Comment actions Permalink
    0
  • As a reminder, now that you've got this to work, please be sure to create a new webhook to generate a new confirmation code as this one has been posted on this forum publicly. 

    Comment actions Permalink
    0
  • OK, we will take your suggestion. Thank you vey much!

    Comment actions Permalink
    1
  • test1

    Comment actions Permalink
    1
  • It seems like you're encountering an issue with enabling an open channel for a webhook Yellow, but you've provided limited information. To troubleshoot this problem, you can follow these general steps:

    1.  
    Comment actions Permalink
    0
  • When facing an issue where a webhook is well established but you still cannot enable the open channel, there are several steps you can take to troubleshoot and resolve the problem. Here are some common areas to check and actions to perform:

    1. Verify Webhook URL and Response:

      • Ensure that the webhook URL sportzfytvapk is correct and publicly accessible.
      • Check that the webhook endpoint is responding with the appropriate status code (usually 200 OK) and is within acceptable response times.
    2.  
    Comment actions Permalink
    0

Please sign in to leave a comment.