Report is not working on https protocol even i set https into admin setting

Hi,

I created dashboard and embed into my app and in local environment it's work fine, but after deploy dev environment with https protocol and check my report is not getting display. to fix that i go into my metabase admin => general => site url and update http to https still my report is not display into https but display that report in http environment.

Hi @ritz
Post "Diagnostic Info" from Admin > Troubleshooting.
And since you're embedding, then you need to update your embedding code.

Hi @flamber,

There is only one difference in code as that is update url protocol http to https, I already did that.
  • Here is my diagnostic info
    {
    "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36",
    "vendor": "Google Inc."
    },
    "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.10+9",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.10",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.10+9",
    "os.name": "Linux",
    "os.version": "4.14.171-105.231.amzn1.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
    },
    "metabase-info": {
    "databases": [
    "mongo"
    ],
    "hosting-env": "elastic-beanstalk",
    "application-database": "postgres",
    "application-database-details": {
    "database": {
    "name": "PostgreSQL",
    "version": "11.10"
    },
    "jdbc-driver": {
    "name": "PostgreSQL JDBC Driver",
    "version": "42.2.18"
    }
    },
    "run-mode": "prod",
    "version": {
    "date": "2021-04-20",
    "tag": "v0.39.0.1",
    "branch": "release-x.39.x",
    "hash": "47bb5f2"
    },
    "settings": {
    "report-timezone": null
    }
    }
    }

@ritz Okay, I don't know what the problem is, so post your embedding code and whatever errors you're seeing in your browser developer console and Admin > Troubleshooting > Logs.

@flamber i did't can see any error in browser console and in iframe it show error like url-env.eba-a2aksujt.us-east-1.elasticbeanstalk.com took too long to respond.

Here is my logs:

[b8760d4d-9ee8-4798-90aa-082a5f320e03] 2021-05-11T08:09:14+05:30 DEBUG metabase.server.middleware.log GET /api/user/current 200 5.4 ms (3 DB calls) App DB connections: 1/4 Jetty threads: 4/50 (3 idle, 0 queued) (60 total active threads) Queries in flight: 0 (0 queued)
[b8760d4d-9ee8-4798-90aa-082a5f320e03] 2021-05-11T08:09:14+05:30 DEBUG metabase.server.middleware.log GET /api/session/properties 200 8.9 ms (2 DB calls) App DB connections: 0/4 Jetty threads: 3/50 (4 idle, 0 queued) (60 total active threads) Queries in flight: 0 (0 queued)
[b8760d4d-9ee8-4798-90aa-082a5f320e03] 2021-05-11T08:09:14+05:30 DEBUG metabase.server.middleware.log GET /api/database 200 4.4 ms (3 DB calls) App DB connections: 0/4 Jetty threads: 3/50 (4 idle, 0 queued) (60 total active threads) Queries in flight: 0 (0 queued)
[b8760d4d-9ee8-4798-90aa-082a5f320e03] 2021-05-11T08:11:22+05:30 DEBUG metabase.server.middleware.log GET /api/user/current 200 4.9 ms (3 DB calls) App DB connections: 1/4 Jetty threads: 4/50 (3 idle, 0 queued) (59 total active threads) Queries in flight: 0 (0 queued)
[b8760d4d-9ee8-4798-90aa-082a5f320e03] 2021-05-11T08:11:22+05:30 DEBUG metabase.server.middleware.log GET /api/session/properties 200 4.4 ms (2 DB calls) App DB connections: 0/4 Jetty threads: 3/50 (4 idle, 0 queued) (59 total active threads) Queries in flight: 0 (0 queued)
[b8760d4d-9ee8-4798-90aa-082a5f320e03] 2021-05-11T08:11:22+05:30 DEBUG metabase.server.middleware.log GET /api/database 200 4.9 ms (3 DB calls) App DB connections: 0/4 Jetty threads: 3/50 (4 idle, 0 queued) (59 total active threads) Queries in flight: 0 (0 queued)

Here is my code

const auth = Auth.verify(token);

    const apiResponse = new ApiResponse();

    const METABASE_SITE_URL = "https://mydomain-env.eba-a2aksujt.us-east-1.elasticbeanstalk.com";

    const METABASE_SECRET_KEY = "my secret key";

    const payload = {

        resource: { dashboard: param.dashboard },

        params: { "tenant": auth.tenant.enterpriseId },

        exp: Math.round(Date.now() / 1000) + (10 * 60) // 10 minute expiration

    };

    const reportToken = jwt.sign(payload, METABASE_SECRET_KEY);

    const iFrameURL = METABASE_SITE_URL + "/embed/dashboard/" + reportToken + "#bordered=false&titled=false";

    apiResponse.data = { iFrameURL: iFrameURL };

    apiResponse.flag = APIFlag.SUCCESS;

    res.send(apiResponse);

My project metabase url where i create question and dashboard is like

http://domainName-env.eba-a2aksujt.useast1.elasticbeanstalk.com

and my report url is having https, is it create an issue?

@ritz Nothing from the log says anything, so I guess it's a problem with your configuration of ELB/ALB.
Go to the URL /api/setting and find the Site URL object and post the output.

@flamber

here is my site url object

{
"key": "site-url",
"value": "https://crmnodemetabasesetup-env.eba-a2aksujt.us-east-1.elasticbeanstalk.com",
"is_env_setting": false,
"env_name": "MB_SITE_URL",
"description": "The base URL of this Metabase instance, e.g. "http://metabase.my-company.com".",
"default": null
}

@ritz Okay, then there must be some other reverse-proxy doing something. Have a look at your EBS/ALB settings.

Thanks it worked after resolving load balancer settings