Bug 1260948 - In Safari web browser the java components info on Openshift console could not be shown correctly
In Safari web browser the java components info on Openshift console could no...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Management Console (Show other bugs)
3.x
Unspecified Mac OS
medium Severity medium
: ---
: ---
Assigned To: stlewis@redhat.com
yapei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-08 05:40 EDT by zhou ying
Modified: 2015-11-23 16:17 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:17:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
by Safari (145.58 KB, image/png)
2015-09-08 05:40 EDT, zhou ying
no flags Details
XHR in Safari (242.47 KB, image/png)
2015-09-08 13:35 EDT, Samuel Padgett
no flags Details
Hawtio Connect Options (104.44 KB, image/png)
2015-09-08 13:46 EDT, Samuel Padgett
no flags Details
localStorage (111.58 KB, image/png)
2015-09-08 13:48 EDT, Samuel Padgett
no flags Details
Debug logging (339.09 KB, image/png)
2015-09-08 14:06 EDT, Samuel Padgett
no flags Details
hawtio-jmx breakpoint (153.07 KB, image/png)
2015-09-08 15:49 EDT, Samuel Padgett
no flags Details
safari with wrong icon (236.70 KB, patch)
2015-09-10 05:08 EDT, zhou ying
no flags Details | Diff
Camel tab with icons in Safari (257.22 KB, image/png)
2015-09-10 08:33 EDT, Samuel Padgett
no flags Details

  None (edit)
Description zhou ying 2015-09-08 05:40:20 EDT
Created attachment 1071262 [details]
by Safari

Description of problem:
When create java pod ,wait untill the pod and container were running, on webconsole connect into the java pod by Safari web browser,could not show the JVM details. But by Firefox or Chrome can show JVM details correctly.

Version-Release number of selected component (if applicable):
Safari 8
openshift v1.0.5-268-g5802c03
kubernetes v1.1.0-alpha.0-1605-g44c91b1

How reproducible:
always

Steps to Reproduce:
1. Use command to create a template:
`oc create -f http://central.maven.org/maven2/io/fabric8/jube/images/fabric8/quickstart-java-camel-spring/2.2.19/quickstart-java-camel-spring-2.2.19-kubernetes.json`
2. By Safari web browser login the webconsole, use the template 'quickstart-java-camel-spring' to create a java pod;
3. Wait untill the pod and container were running status, connect into the java pod.


Actual results:
On the javascript console could not show the JVM details by Safari web browser, but use Firefox or Chrome or IE11 can show correctly.

Expected results:
Should show the JVM trees and java plugin details correctly by Safari web browser.

Additional info:
Comment 1 Jessica Forrester 2015-09-08 13:16:49 EDT
Can you attach a screenshot of what you are seeing, are there any errors in the javascript console?
Comment 2 Jessica Forrester 2015-09-08 13:25:54 EDT
Sorry just saw the attachment, ignore previous request.
Comment 3 Samuel Padgett 2015-09-08 13:35:43 EDT
Created attachment 1071434 [details]
XHR in Safari

The XHR has no authorization header.
Comment 4 Samuel Padgett 2015-09-08 13:46:39 EDT
Created attachment 1071437 [details]
Hawtio Connect Options
Comment 5 Samuel Padgett 2015-09-08 13:48:52 EDT
Created attachment 1071438 [details]
localStorage
Comment 6 Samuel Padgett 2015-09-08 13:56:21 EDT
localStorage.jvmConnect:

"{"quickstart-java-simple-mainclass":{"scheme":"https","host":"openshiftdev.local","port":8443,"path":"api/v1/namespaces/project3/pods/quickstart-java-simple-mainclass-6z43w:8778/proxy/jolokia/","useProxy":false,"jolokiaUrl":"https://openshiftdev.local:8443/api/v1/namespaces/project3/pods/quickstart-java-simple-mainclass-6z43w:8778/proxy/jolokia/","userName":null,"password":null,"view":null,"name":"quickstart-java-simple-mainclass","title":"quickstart-java-simple-mainclass","returnTo":"https://openshiftdev.local:8443/console/project/project3/browse/pods"}}"
https://openshiftdev.local:8443/api/v1/namespaces/project3/pods/quickstart-java-simple-mainclass-6z43w:8778/proxy/jolokia/?maxDepth=7&maxCollectionSize=500&ignoreErrors=true&canonicalNaming=false
Comment 7 Samuel Padgett 2015-09-08 14:06:02 EDT
Created attachment 1071440 [details]
Debug logging
Comment 8 Samuel Padgett 2015-09-08 15:49:02 EDT
Created attachment 1071456 [details]
hawtio-jmx breakpoint

new URI().hash() returns ""
Comment 9 Samuel Padgett 2015-09-08 15:53:57 EDT
The URL in the location bar doesn't have a hash value when the breakpoint is hit.
Comment 11 stlewis@redhat.com 2015-09-08 16:13:53 EDT
I wonder, the token is base64 encoded, right?  Wonder if there's a chance some odd character that should be URL encoded is causing this.
Comment 12 Samuel Padgett 2015-09-08 17:15:00 EDT
The good news: changing the link from /console/java/index.html -> /console/java/ allows the token to be read.

The bad news: This causes a later runtime error.

> TypeError: undefined is not an object (evaluating 'e.replace')
Comment 13 Samuel Padgett 2015-09-09 11:09:11 EDT
https://github.com/openshift/origin/pull/4594
Comment 14 zhou ying 2015-09-10 05:07:37 EDT
Have confirmed on devenv_2314.
openshift v1.0.5-322-g31315f4
kubernetes v1.1.0-alpha.0-1605-g44c91b1

The JVM trees can be showed, but when expand the Camel Route tree , some icon was not correct, when open the develope mode , still have 403 response. please see the new attachment.
Comment 15 zhou ying 2015-09-10 05:08:53 EDT
Created attachment 1072064 [details]
safari with wrong icon
Comment 16 Samuel Padgett 2015-09-10 08:33:30 EDT
Created attachment 1072160 [details]
Camel tab with icons in Safari
Comment 17 Samuel Padgett 2015-09-10 08:34:53 EDT
Comment on attachment 1072160 [details]
Camel tab with icons in Safari

Disregard, I see the problem when I expand the cbr-route tree node.
Comment 18 Samuel Padgett 2015-09-10 09:27:58 EDT
This second problem is unrelated to the first.

In Safari, I see

<img src="/img/icons/camel/endpoint24.png">

In Chrome, I see

<img src="/console/java/icons/camel/endpoint24.png">

The HTML <base> is correctly set in Safari, and the other icons show up. Stan, any ideas?
Comment 19 Samuel Padgett 2015-09-10 09:54:35 EDT
Looks like hawtio-integration has icons with absolute paths.

https://github.com/hawtio/hawtio-integration/blob/6a7aba40e75103d66e5ce2571274a1eb31d4ce28/plugins/camel/ts/endpointChooser.ts
Comment 20 stlewis@redhat.com 2015-09-10 15:05:39 EDT
Seems odd, the paths actually should get updated at runtime to the right one based on the document base.  Just to be on the safe side I tweaked those to be relative, also spotted one other place where the code wasn't adding the document base.  PR is here -> https://github.com/openshift/origin/pull/4621
Comment 21 zhou ying 2015-09-10 22:48:16 EDT
Confirmed on fedora_2323:
openshift v1.0.5-344-gd9fb965
kubernetes v1.1.0-alpha.0-1605-g44c91b1

It works now.

Note You need to log in before you can comment on or make changes to this bug.