Jigsaw-Code / outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
https://getoutline.org/
Apache License 2.0
8.46k stars 1.37k forks source link

Handle Digital Ocean connection when "MISSING BILLING INFORMATION" is thrown #1889

Open McGish opened 4 years ago

McGish commented 4 years ago

After 2 weeks of use with no issues my DigitalOcean (DO) servers which I was monitoring with Outline Manager (OM) have vanished and OM tells me to add my billing info to DO (which I have), as well as an error message at the bottom telling me OM failed to get my DO info. I have checked that DO has granted permissions in the authorised applications section to OM and have also tried revoking the permissions and then reinstating them, as well as logging out of DO within OM and logging in again, as well as uninstalling and reinstalling OM. I also contacted DO and they confirmed there is no issue with my billing. I've posted this query on OutlineVPN Reddit and also attempted to contact the support team via the Outline support form, but it's been almost a month with no reply. Does anyone have any suggestions? Thanks!

Outline Manager 2 Outline Manager

fortuna commented 4 years ago

There has been some issues with DigitalOcean in the past. Is this still an issue?

McGish commented 4 years ago

There has been some issues with DigitalOcean in the past. Is this still an issue?

It is running fine in my Linux partition, but on Windows I'm still having this problem.

Thanks!

fortuna commented 4 years ago

@mpmcroy any idea why this would still be an issue on Window?

thiras commented 3 years ago

I confirm the problem on both Linux and Windows. Billing information is there but getting the same error.

McGish commented 3 years ago

Both are now functioning as normal for me!

psun3 commented 3 years ago

I still experience this issue on my Windows and MacOS..

shlmvgett commented 3 years ago

Still does not work (for macOs)

khoangt commented 3 years ago

I still experience this issue on my Windows and MacOS

psun3 commented 3 years ago

try contacting DigitalOcean and ask for droplet limit increase. That solved my problem. See this: https://github.com/Jigsaw-Code/outline-server/issues/904

hudochenkov commented 2 years ago

Issues in this code:

https://github.com/Jigsaw-Code/outline-server/blob/f420ca917e4a6703275dc7f6a8a2faf458d50bf7/src/server_manager/web_app/digitalocean_account.ts#L46-L55

I have only one droplet in Digital Ocean, and it's used by Outline. When Outline Manager starts it sends request to https://api.digitalocean.com/v2/account to get info.

This endpoint returns this for me:

{
    "account": {
        "droplet_limit": 1,
        "floating_ip_limit": 3,
        "volume_limit": 1,
        "email": "...",
        "uuid": "...",
        "email_verified": true,
        "status": "warning",
        "status_message": "You have created the maximum allowed number of Droplets. Please resolve this on the control panel."
    }
}

Code above doesn't handle status warning correctly and returns MISSING_BILLING_INFORMATION instead. Which in turn shown incorrect UI.

Ideally Outline Manager should show warning, if it's relevant.

Since I just want to test Outline I made changes in source code in mentioned above function. And recompiled binary for me:

async getStatus(): Promise<digitalocean.Status> {
    const account = await this.digitalOcean.getAccount();
    if (account.status === 'active') {
      return digitalocean.Status.ACTIVE;
    }
    if (!account.email_verified) {
      return digitalocean.Status.EMAIL_UNVERIFIED;
    }
+   // @ts-ignore
+   if (account.status === 'warning' && account.status_message.includes('You have created the maximum allowed number of Droplets.')) {
+     return digitalocean.Status.ACTIVE;
+   }
    return digitalocean.Status.MISSING_BILLING_INFORMATION;
  }
SimonOsipov commented 2 years ago

Have the same error

fortuna commented 2 years ago

@hudochenkov, that's very helpful, thank you.

Does anyone know what the status is when the billing is missing? If it's warning, then the fix won't trigger the enter billing info view. (I wish the account state API object was better documented)

I think the appropriate fix is to just try to list the servers and remove the status check on load: https://github.com/Jigsaw-Code/outline-server/blob/f420ca917e4a6703275dc7f6a8a2faf458d50bf7/src/server_manager/web_app/app.ts#L343-L346

We need to make sure we handle listing errors appropriately though.

We check the status on the server creation anyway: https://github.com/Jigsaw-Code/outline-server/blob/f420ca917e4a6703275dc7f6a8a2faf458d50bf7/src/server_manager/web_app/app.ts#L494

SimonOsipov commented 2 years ago

For those, who came here, searching for solution and PR still not merged, you can increase number of droplets in your DO account settings by filling out the form and it will increase, which will allow you to use it.

maddyhof commented 1 year ago

QA reproduced this