Web GUI is not refreshing - proxy fault?

Hey!

I am currently on Drone v2.0.0 (built from OSS nolimit).

My main issue is that web gui does not update statuses or build steps correctly, and I do need to constantly refresh the page.

If not refreshed, that’s how page looks like:
image

If refreshed - all seems to be good:
image

As you can see - build step status is not updated and is stuck as running as long as page is not refreshed.

My nginx config:

upstream drone {
    server 127.0.0.1:3080;
}

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 443 ssl;

    root /var/www/ci.example.com/html;
    index index.html index.htm;

    server_name drone.xx;

    client_max_body_size 0;
    
    access_log /var/log/nginx/drone.access.log;
    error_log /var/log/nginx/drone.error.log;
    
    ssl_certificate /opt/certs/ssl/fullchain.pem;
    ssl_certificate_key /opt/certs/ssl/privkey.pem;

    location / {
        proxy_pass http://drone;

        include proxy_params;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;

        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_buffering off;
        chunked_transfer_encoding off;
        proxy_read_timeout 86400;
    }
}

YAML:

kind: pipeline
type: docker
name: build

steps:
- name: publish
  image: plugins/docker
  settings:
    registry: harbor.xx
    username:
      from_secret: registry_user
    password:
      from_secret: registry_password
    repo: harbor.xx/xx/wksp_reloader
    auto_tag: true
    dry_run: false
    purge: true

trigger:
  ref:
    include:
    - refs/tags/*
  event:
    include:
    - push
    - tag

Though that doesn’t seem to be Nginx problem. I have tested without proxying via Nginx, and the result is the same - step status does not update itself.

Do you have any thoughts on this? Or would you need more information fro my side?

Thanks for your time. :slight_smile:

@made2140,

Could you please confirm its not refreshing for each run, or its intermittent, also have you tried running in incognito mode.

Regards,
Harness Support

@csgit,

Yes, it is not refreshing for each run. Also, have tried with incognito mode - no changes whatsoever.

drone uses Server Sent Events to auto-update the user interface, and I can confirm this typically requires a special reverse proxy configuration. Unfortunately I have never used nginx so this is outside my area of expertise, but I suspect there are probably some blog posts / stack overflow threads on the topic.

@bradrydzewski ,

the issue is that this situation is also happening without using nginx, i.e. accessing directly via IP, even with incognito. That’s why I’m not fully suspecting that it’s proxy’s issue, though.

Or, are you saying that correct proxy config might help to dismiss that web is not auto-updating?

@made2140 I have not been able to reproduce auto-update issues. You can see it working in this demo that I recently gave. I acknowledge that a subset of the community has reported issues, however, this seems to be isolated to a subset of installations (we have thousands of active installs, and many are running 2.0 without issue). So unfortunately there is not much I can do if I cannot reproduce a problem. I think ideally someone that can consistently reproduce the problem would triage by running the drone UI from source (in development mode) to try and provide more details.

I found that if repo name contains underscore or capital letter, the Drone build page will not update. I can confirm that.

Hello :wave:
my company is having the same issue, several Drone pipelines lost the possibility to auto-refresh the GUI.

Related to @tkushnir

I found that if repo name contains underscore or capital letter, the Drone build page will not update. I can confirm that.

just wanted to say that our projects do not contain _ or capital letters, however my company name which is part of the URL is camel cased, for instance my repo ends up being: git@github.com:HelloWorld/my-api.git

hope that can help :pray:

This is truly unexpected… Couldn’t think that both repository or org name could affect that. :smiley:

Thanks to both @mugx and @tkushnir - I have tested myself with org and repo names lowercase and without underscore, seems that it works as it should be. :slight_smile:

@bradrydzewski, have such things occurred to you or anyone else before?
Since our company’s organization names are client-based, it’s not really possible to alter them. Could this be introduced as a bugfix in your backlog?

Also, I can confirm that dot ( . ) in repository name is also affected by this bug. Only dash, so far, is a viable separator.

In fact I have the same issue.
But using Chrome I see the bug, using the mobile phone not…

Seems like after this patch the bug is gone. Thanks @bradrydzewski !

@tkushnir , thanks for the update!
@bradrydzewski , thanks as well for the fix! To which drone version fix would be applied?

I try to make a build with dep

go: downloading github.com/drone/drone-ui v0.0.0-20210615220538-5f47342ade8c

but for me is not working. But maybe I did something wrong…

I am facing the same issue here, and my pipeline/repo/step names are full of “-”, master branch of Drone is not fixing it.

I discovered that the tilde-char (~) is not allowed also. This char is used in the URL for private repositories in Bitbucket Server. Fixed in PR 361: allow ~ in project name by muffl0n · Pull Request #361 · drone/drone-ui · GitHub