# Slack plugin notifications error

**URL:** https://drone.discourse.group/t/slack-plugin-notifications-error/10475
**Category:** Drone Support
**Created:** [October 1, 2017, 8:54pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475 "2017-10-01T20:54:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![enobt](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/enobt/32/3996_2.png) [@enobt](https://drone.discourse.group/u/enobt)
#### Post date: [October 1, 2017, 8:54pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475/1 "2017-10-01T20:54:52Z")

</div>

I added notifications to my .drone.yml, but I keep getting an error for:

Post : unsupported protocol scheme “”

Not sure what is causing this error. Config looks like:

slack:  
image: plugins/slack  
channel: MY\_CHANNEL  
secrets: [slack\_webhook]  
username: drone  
template: \>  
{{#success build.status}}  
Build {{build.number}} succeeded - Good job team!  
{{else}}  
Build {{build.number}} failed - fix me please! 💩  
{{/success}}  
when:  
status: [success, failure]

Thanks in advance.

---

<div class="post-metadata">

### Author: ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)
#### Post date: [October 1, 2017, 9:16pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475/2 "2017-10-01T21:16:02Z")

</div>

This error message is the result of the secret not being passed to the plugin. The webhook must be a valid url, and when the webhook secret is not passed to the plugin, the webhook url is blank.

```nohighlight
Post : unsupported protocol scheme ""

```

The most common root cause for this, with regards to the slack plugin, is forgetting to enable the secret for pull requests as mentioned in [this thread](https://github.com/drone-plugins/drone-slack/issues/64#issuecomment-331772652). Secrets are not passed to pull requests by default, for security reasons.

If this is not the case, please see the following section of the docs that demonstrate all the information we will need to see to further help you troubleshoot, which you can post back to this thread.  
[http://docs.drone.io/secrets-not-working/#still-having-trouble](http://docs.drone.io/secrets-not-working/#still-having-trouble)

---

<div class="post-metadata">

### Author: ![enobt](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/enobt/32/3996_2.png) [@enobt](https://drone.discourse.group/u/enobt)
#### Post date: [October 1, 2017, 10:07pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475/3 "2017-10-01T22:07:41Z")

</div>

Pull request seems to be enabled for this secret:

slack\_webhook  
Events: push, tag, deployment, push, pull\_request  
SkipVerify: false  
Conceal: false

Let me try to wrap it in quotes to see if that works.

---

<div class="post-metadata">

### Author: ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)
#### Post date: [October 1, 2017, 10:40pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475/4 "2017-10-01T22:40:35Z")

</div>

I think we need the following additional information:

- what version of drone server are you running?
- what version of drone cli are you running?
- exact command you used to create the secret (with only the secret redacted)

The reason is that the CLI output you posted looks like from an old version of the CLI. Using a very old version of the CLI with a new version of the server could result in secrets not being properly created.

If you are using drone 0.7 or 0.8 please ensure you are using the correct CLI install instructions and download links [http://docs.drone.io/cli-installation/](http://docs.drone.io/cli-installation/)

---

<div class="post-metadata">

### Author: ![enobt](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/enobt/32/3996_2.png) [@enobt](https://drone.discourse.group/u/enobt)
#### Post date: [October 1, 2017, 10:57pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475/5 "2017-10-01T22:57:39Z")

</div>

Okay got this working, so I copied the examples listed in the documentation and I think the culprit is an erroneous space in the declarations. This may be an issue when using newline `\` syntax and using the up arrow key or it’s adding `=` signs after the variable flags.

Thanks for the help and I’m glad we got this figured out, just hate the time spent - my bad.

Yay, drone though - totally like the product, KUDOS!!

---

<div class="post-metadata">

### Author: ![metal3d](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/metal3d/32/4750_2.png) [@metal3d](https://drone.discourse.group/u/metal3d)
#### Post date: [July 10, 2019, 12:00pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475/6 "2019-07-10T12:00:58Z")

</div>

I tried and get the same error:

```
- name: slack
  image: plugins/slack
  settings:
    webhook:
      from_secret: slack-wh
    channel: portal-integration

```

The webhook url is correctly copied in secret named “slack-wh” - I used web interface to create the secret.

Result is

`2019/07/10 11:46:32 Post : unsupported protocol scheme ""`

I activated traces and see:  
`{"kind":"secret","level":"trace","msg":"secret: encrypted: no matching secret","name":"slack-wh","time":"2019-07-10T11:46:05Z"}`

But the secret is here !

```
drone secret ls xxxxxx

slack-wh 
Pull Request Read: false
Pull Request Write: false

```

Drone v1.1.0:  
image: [docker.io/drone/drone:1.1.0](http://docker.io/drone/drone:1.1.0)

---

<div class="post-metadata">

### Author: ![metal3d](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/metal3d/32/4750_2.png) [@metal3d](https://drone.discourse.group/u/metal3d)
#### Post date: [July 10, 2019, 12:19pm UTC](https://drone.discourse.group/t/slack-plugin-notifications-error/10475/7 "2019-07-10T12:19:47Z")

</div>

And I know understand that I didn’t activated “pull-request” authorization… Sorry for that
