Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] : Unhandled rejection detected- Error: rison decoder error: unable to parse string as rison: - this error is shown in the console as soon as you click on APM UI when the storeinsession is turned on in adv settings. #25165

Closed
rashmivkulkarni opened this issue Nov 5, 2018 · 8 comments
Assignees
Labels
blocker bug Fixes for quality problems that affect the customer experience Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v6.5.0

Comments

@rashmivkulkarni
Copy link
Contributor

rashmivkulkarni commented Nov 5, 2018

Kibana version: 6.5.0 BC2 / ( BC3 as well. )

Elasticsearch version: 6.5.0 BC2

Server OS version: CentOS 7

Browser version: Chrome

Original install method (e.g. download page, yum, from source, etc.): 6.5.0 BC2

Describe the bug: Bring up 6.5.0 BC2 and open up Kibana. Navigate to APM and see that its blank and in the console the following error is shown .

vendors.bundle.js:208 Error: rison decoder error: unable to parse string as rison: ''h@44136fa''
    at rison.parser.errcb [as errorHandler] (vendors.bundle.js:43)
    at rison.parser.parse (vendors.bundle.js:43)
    at Object.rison.decode (vendors.bundle.js:43)
    at getGArg (apm.bundle.js:9)
    at exports.UnconnectedKibanaLink (apm.bundle.js:9)
    at beginWork (vendors.bundle.js:208)
    at e (vendors.bundle.js:208)
    at f (vendors.bundle.js:208)
    at G (vendors.bundle.js:208)
    at x (vendors.bundle.js:208)
    at n (vendors.bundle.js:208)
    at B (vendors.bundle.js:208)
    at v (vendors.bundle.js:208)
    at b (vendors.bundle.js:208)
    at Object.updateContainer (vendors.bundle.js:208)
    at sg.render (vendors.bundle.js:208)
bf @ vendors.bundle.js:208
commitErrorLogging @ vendors.bundle.js:208
R @ vendors.bundle.js:208
G @ vendors.bundle.js:208
x @ vendors.bundle.js:208
n @ vendors.bundle.js:208
B @ vendors.bundle.js:208
v @ vendors.bundle.js:208
b @ vendors.bundle.js:208
updateContainer @ vendors.bundle.js:208
sg.render @ vendors.bundle.js:208
(anonymous) @ vendors.bundle.js:208
unbatchedUpdates @ vendors.bundle.js:208
Eg @ vendors.bundle.js:208
render @ vendors.bundle.js:208
(anonymous) @ apm.bundle.js:9
Promise.then (async)
5720 @ apm.bundle.js:9
__webpack_require__ @ vendors.bundle.js:2
requireLegacyFiles @ apm.bundle.js:9
LegacyPlatformService.start @ commons.bundle.js:3
CoreSystem.start @ commons.bundle.js:3
5719 @ apm.bundle.js:9
__webpack_require__ @ vendors.bundle.js:2
webpackJsonpCallback @ vendors.bundle.js:2
(anonymous) @ apm.bundle.js:3
commons.bundle.js:3 Detected an unhandled Promise rejection.
Error: rison decoder error: unable to parse string as rison: ''h@44136fa''

screen shot 2018-11-05 at 12 27 31 pm

cc / @elastic/apm-ui @elastic/kibana-qa

@rashmivkulkarni rashmivkulkarni added bug Fixes for quality problems that affect the customer experience Team:APM - DEPRECATED Use Team:obs-ux-infra_services. labels Nov 5, 2018
@rashmivkulkarni
Copy link
Contributor Author


# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#elasticsearch.logQueries: false

# Specifies the path where Kibana creates the process ID file.
#pid.file: /var/run/kibana.pid

# Enables you specify a file where Kibana stores log output.
#logging.dest: stdout

# Set the value of this setting to true to suppress all logging output.
#logging.silent: false

# Set the value of this setting to true to suppress all logging output other than error messages.
#logging.quiet: false

# Set the value of this setting to true to log all events, including system usage information
# and all requests.
#logging.verbose: false

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
#ops.interval: 5000

# Specifies locale to be used for all localizable strings, dates and number formats.
#i18n.locale: "en"
elasticsearch.url: https://elastic:changeit@localhost:9200
logging.verbose: true
server.ssl.enabled: true
elasticsearch.username:
elasticsearch.password:
xpack.reporting.encryptionKey: ThisIsReportingEncryptionKey1234
xpack.security.encryptionKey: ThisIsSecurityEncryptionKey12345
xpack.reporting.queue.timeout: 60000
server.host: 0.0.0.0
server.ssl.certificate: /etc/kibana/kibana.crt
server.ssl.key: /etc/kibana/kibana.key
elasticsearch.ssl.certificateAuthorities: ["/etc/kibana/ca.crt"]

# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#elasticsearch.logQueries: false

# Specifies the path where Kibana creates the process ID file.
#pid.file: /var/run/kibana.pid

# Enables you specify a file where Kibana stores log output.
#logging.dest: stdout

# Set the value of this setting to true to suppress all logging output.
#logging.silent: false

# Set the value of this setting to true to suppress all logging output other than error messages.
#logging.quiet: false

# Set the value of this setting to true to log all events, including system usage information
# and all requests.
#logging.verbose: false

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
#ops.interval: 5000


kibbana.yml

@rashmivkulkarni
Copy link
Contributor Author

This happens only when in Advanced settings > state:storeInSessionStorage > is turned on.

@rashmivkulkarni rashmivkulkarni changed the title [APM] : Unhandled rejection detected- Error: rison decoder error: unable to parse string as rison: - this error is shown in the console as soon as you click on APM UI. [APM] : Unhandled rejection detected- Error: rison decoder error: unable to parse string as rison: - this error is shown in the console as soon as you click on APM UI when the storeinsession is turned on in adv settings. Nov 5, 2018
@sorenlouv
Copy link
Member

Hi @Rasroh, thanks for making us aware of this issue.

The error seems to be caused by this line:

if (g && !isEmpty(rison.decode(g))) {

Currently we blindly decode the querystring arg _g with rison.decode.

@w33ble what is your suggested approach? Should we wrap rison.decode like:

function safeRisonDecode(data) {
  try {
    return rison.decode(data);
  } catch (e) {
    return null;
  }
}

@jasonrhodes
Copy link
Member

jasonrhodes commented Nov 5, 2018

Something to note: this doesn't appear to be a valid value for _g -- we should handle it better, but if you try to use that value for another link in Kibana, you do get redirected to the same URL without that _g value, and 3 toasts pop up with errors, e.g. http://localhost:5601/app/kibana#/home?_g=h@44136fa

screen shot 2018-11-05 at 5 13 44 pm

@w33ble
Copy link
Contributor

w33ble commented Nov 5, 2018

Almost none of the rest of the codebase uses that check. There's no harm in adding a safeRisonDecode function there, but I'd be curious to learn why the value of currentQuery._g is not rison encoded. It looks like the value it ends up getting is missing the outer quotes.

Seems like perhaps some other part of the code is setting an invalid global state value. Knowing where and why would be useful.

@sorenlouv
Copy link
Member

this doesn't appear to be a valid value for _g
@jasonrhodes

Agree! It seems to be caused by an error somewhere else in the system. And it would be better if we could fix it at the at the root.

@jasonrhodes
Copy link
Member

jasonrhodes commented Nov 6, 2018

So this is just a bug in our 6.5 code, we are using rison.decode in a place where we should be using rison.encode don't need to be and that can sometimes cause the rison lib to throw. We'll get this fixed ASAP.

@jasonrhodes
Copy link
Member

@w33ble turns out the value was ok, but we were trying to rison.decode() it again and that caused the rison lib to throw. If we just pass it along, everything works ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v6.5.0
Projects
None yet
Development

No branches or pull requests

5 participants