Options

Flyway desktop not working behind Web Proxy

javaDukejavaDuke Posts: 12 Bronze 1
edited August 24, 2023 5:31PM in Flyway Desktop
Hello, I've installed Flyway desktop to my MacOS and when it started it asks to login via a browser, after successful login it advised to go back to the Flyway desktop...however the desktop still shows [Login] button link.

Upon examining logs I see that there is an error:
--------------
Info: Usage reporting request made to https://productusage.red-gate.com/v1/usageevents Number of submitted usage events = 1 HTTP status code = 200 OK Response body =
10:14:43.961|info   |[UI action] LOAD_USER_SETTINGS
10:14:44.046|error  |[CFU] Error attempting to check/download update: Client network socket disconnected before secure TLS connection was established
10:14:44.614|info   |[Permit] Reading last saved online permit from offline store
10:14:44.831|info   |[UI action] UPDATE_LICENSE_STATE
10:14:44.832|info   |[UI action] SET_ENTITLED_CAPABILITIES
10:14:44.848|info   |[UI action] UPDATE_TRIALS_STATE
10:14:44.849|info   |[Permit] Fetching available trials.
10:14:44.930|info   |[UI action] UPDATE_TRIALS_STATE
10:15:04.407|warn   |[Permit] unable to get tokens using browser auth: Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (node:internal/errors:717:14)
    at TLSSocket.onConnectEnd (node:_tls_wrap:1595:19)
    at TLSSocket.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

It seems to me that the integration with the browser based authentication is not working in a restricted environment (like the one I have - enterprise web proxy)

How can I use Flyway Desktop in "offline mode" or in a "restricted network mode"?

P.S.
browser opens some local port:
http://localhost:60161/?code=1EE..9&scope=openid RedGate.Publ...
Perhaps there is something wrong with browser/app permissions? 

Best Answers

  • Options
    chrisqtranchrisqtran Posts: 93 Silver 1
    Hi there,

    If you go into %appdata%\Redgate\Flyway Desktop (should lead you to \AppData\Roaming\Redgate\Flyway Desktop)
     
    If you then open
    community.json
    and change to
    {"communityEditionEnabled":true}
    Then change the 
    trial.json
    {"edition":"Community"}
    This should get you working on the community edition.
  • Options
    Peter_LawsPeter_Laws Posts: 220 Silver 2
    Thank you for the feedback javaDuke, our expectation was that in a locked down environment a browser would be initialised and fail, exposing the licensing target.
    Please use the above link and let me know the outcome.
    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
  • Options
    javaDukejavaDuke Posts: 12 Bronze 1
    edited September 22, 2023 2:01PM Answer ✓
    Thank you @Peter_Laws your link worked and I was able to get the magic sequence!

  • Options
    Peter_LawsPeter_Laws Posts: 220 Silver 2
    Delighted to hear it javaDuke!
    I apologise for the trek to Mt Doom and back that it took, with the new licensing model, you should have an easier time of it.

    If I don't speak to you before, have a great weekend!
    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?

Answers

  • Options
    Hi there,

    Thank you for reaching out.

    Can you send this article to your IT team to make sure our endpoints aren't being blocked?
    https://productsupport.red-gate.com/hc/en-us/articles/360002374673-Licensing-update-URLs-to-add-to-your-AllowList-in-firewall

    If that fails, you can also try our offline activation method detailed in this article:
    https://productsupport.red-gate.com/hc/en-us/articles/360004919994-Manual-Offline-Activation-for-user-based-tools
  • Options
    javaDukejavaDuke Posts: 12 Bronze 1
    Thank you for the pointers. Unfortunately in enterprise high-security environment its not allowed to make such changes to the network infrastructure and offline activation seems quite cumbersome (using a separate computer that is also in high-security env. and not allowed to make external calls).

    I just wonder why a community edition mode requires "activation over net" in the first place?
    Could it be just open/activated for everyone by default (e.g. a permanent "community license" as part of the desktop tool)?  
  • Options
    javaDukejavaDuke Posts: 12 Bronze 1
    edited August 29, 2023 2:10PM
     Hi chrisqtran,

    Thank you for the workaround. I use MacOS and I believe the location of the"Redgate\Flyway Desktop" is in my user folder:
    "~/Library/Preferences/Redgate/Flyway Desktop"
    When I listed files in there I see only 2 files:
    data.json
    community.json (it already contains communityEditionEnabled as true)

    But there is no trial.json, so I tried to create this file with the content inside as you suggested.
    When I restarted the Flyway desktop its still asking me to Signin.
    Perhaps I'm missing something. 

    Hi there,

    If you go into %appdata%\Redgate\Flyway Desktop (should lead you to \AppData\Roaming\Redgate\Flyway Desktop)
     
    If you then open
    community.json
    and change to
    {"communityEditionEnabled":true}
    Then change the 
    trial.json
    {"edition":"Community"}
    This should get you working on the community edition.


  • Options
    Can you close Flyway Desktop, then navigate to http://localhost:22221/redgate/status.html -> Licensing settings -> uncheck "Enable user account licensing on this computer.", then re-open Flyway Desktop? You shouldn't have to sign in after this.
  • Options
    javaDukejavaDuke Posts: 12 Bronze 1
    edited August 31, 2023 2:00PM
    When I try to navigate to the  http://localhost:22221/redgate/status.html I get error "This site can’t be reached" (I tried with desktop closed and also with desktop running)...same result.

    NOTE: I've installed Flyway Desktop on MacOS M1 Pro chip
  • Options
    mCampbellmCampbell Posts: 1 New member
    I'm experiencing the exact same issue as javaDuke (MacOS M1 Pro chip)
    I also had to create the trial.json file as it did not exist
  • Options
    javaDukejavaDuke Posts: 12 Bronze 1
    edited August 31, 2023 3:19PM
    I have tried to activate on another MacOS machine I have that is on my private personal network. So in this setup the login worked and I observe there are 2 extra files created after successful login in the folder "~/Library/Preferences/Redgate/Flyway Desktop":
    - permit.jwt
    - permit.refresh.token

    Just my observation. Behind a firewall with restricted network websites & ports its still not working...which is pretty much a showstopper for a corporate dev setup. 
  • Options
    Hi javaDuke,

    On your Mac in the locked down environment, if you navigate to the licensing page within Flyway Desktop do you see the following offline activation option?



    The button launches a webpage to allow for a challenge / response interaction; at this point I'd expect it to fail due to the locked down environment. So if you take that url and pass it to a machine that can more feely navigate, you'll have to authenticate in a browser to get to your authorised Redgate account and then it will provide you a lengthy authorisation string. If you then copy that back to your locked down environment, that will populate the permit for you as you described occurring in the other environment, without needing network access.
    This also doesn't use the Redgate Client which was a source of confusion earlier in the conversation.
    Kind regards
    Peter Laws | Redgate Software
    Have you visited our Help Center?
  • Options
    javaDukejavaDuke Posts: 12 Bronze 1
    Thank you @Peter_Laws for the explanation! Unfortunately when I click on [Manage offline license] there is no pop up with the browser window happens...that pretty much stops me from obtaining the URL.
    I hope there is another way how I can activate offline.


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file