nanobox icon indicating copy to clipboard operation
nanobox copied to clipboard

Auto generated evar does not match with actual value

Open robobakery opened this issue 7 years ago • 0 comments
trafficstars

hey, nanobox guys. how are you?

i am suffering an unknown issue with environment variable generation when using an image selenium/standalone-chrome as data.chrome

issue: DATA_CHROME_HOST has wrong ip address.

this issue only happens when i deploy to production server.

here i attach my case to be reproduced, please check and see if this is happening inside nanobox or not.

-- LOCAL

$ mkdir nanobox-wrong-evar && cd nanobox-wrong-evar $ touch boxfile.yml

data.chrome:
  image: selenium/standalone-chrome

run.config:
  engine: elixir

$ touch body.json

{
  "desiredCapabilities": {
    "browserName": "chrome",
    "chromeOptions": {
      "args": ["--user-agent=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"]
    },
    "cssSelectorsEnabled": true,
    "javascriptEnabled": false,
    "nativeEvents": false,
    "platform": "ANY",
    "rotatable": false,
    "takesScreenshot": true,
    "version": ""
  }
}

$ nanobox info local

...
data.chrome
  IP      : 172.21.0.4

Environment Variables
  APP_NAME = dev
  DATA_CHROME_HOST = 172.21.0.4
...

$ nanobox run $ curl -H "Content-Type: application/json" --data @body.json http://172.21.0.4:4444/wd/hub/session

{"status":0,"sessionId":"81f94fc056c4b8d1f14fd152565134ea","value":{"applicationCacheEnabled":false,"rotatable":false,"mobileEmulationEnabled":false,"networkConnectionEnabled":false,"chrome":{"chromedriverVersion":"2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb)","userDataDir":"/tmp/.org.chromium.Chromium.0f1Lwu"},"takesHeapSnapshot":true,"pageLoadStrategy":"normal","databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":false,"version":"66.0.3359.117","platform":"Linux","browserConnectionEnabled":false,"nativeEvents":true,"acceptSslCerts":false,"acceptInsecureCerts":false,"locationContextEnabled":true,"webStorageEnabled":true,"browserName":"chrome","takesScreenshot":true,"javascriptEnabled":true,"cssSelectorsEnabled":true,"setWindowRect":true,"unexpectedAlertBehaviour":"","webdriver.remote.sessionid":"81f94fc056c4b8d1f14fd152565134ea"}}

DEPLOYMENT

$ nanobox remote add nanobox-wrong-evar $ nanobox deploy $ nanobox console do.1

$ docker inspect data.chrome.1.1 IPv4Address = 192.168.0.14 $ curl -H "Content-Type: application/json" --data @body.json http://192.168.0.14:4444/wd/hub/session

works fine

however, in config tab, what i see is DATA_CHROME_HOST = 192.168.0.13

what is actually happening with evar auto generation?

robobakery avatar May 05 '18 06:05 robobakery