question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

INTERNAL_SERVER_ERROR - "Int cannot represent non-integer value:"

See original GitHub issue

Hello,

Description

Pages throws a “ERROR” and are not displayed correctly at the second request.

Environment

  1. OS (where OpenCTI server runs): Ubuntu 18.04.2, x64.
  2. OpenCTI version: opencti-20190628.tar.gz
  3. OpenCTI client: frontend
  4. Other environment details: Fresh installation.

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Install OpenCTI following the manual documentation
  2. Click on any page, the first request usually works, but the second throws the “ERROR” message on the top left corner.

Expected Output

Pages correctly displayed

Actual Output

  • “ERROR” is displayed on all pages:

Screenshot from 2019-06-28 23-42-53

The browser console throws this error:

Error: ""
    i construct.js:30
    a wrapNativeSuper.js:22
    n environment.js:39
    render environment.js:108
    render ReactRelayQueryRenderer.js:216
    React 11
    handleDataChange ReactRelayQueryRenderer.js:142
    error ReactRelayQueryFetcher.js:194
    error ReactRelayQueryFetcher.js:193
    error RelayObservable.js:553
    error RelayObservable.js:553
    r RelayObservable.js:178
    error RelayObservable.js:553
    error RelayObservable.js:553
    error RelayReplaySubject.js:105
    error RelayReplaySubject.js:104
    error fetchQueryInternal.js:126
    error RelayObservable.js:553
    error RelayObservable.js:553
    _error RelayModernQueryExecutor.js:190
    error RelayModernQueryExecutor.js:85
    error RelayObservable.js:553
react-dom.production.min.js:4408
    React 7
    unstable_runWithPriority scheduler.production.min.js:274
    React 7
    handleDataChange ReactRelayQueryRenderer.js:142
    error ReactRelayQueryFetcher.js:194
    error ReactRelayQueryFetcher.js:193
    error RelayObservable.js:553
    error RelayObservable.js:553
    r RelayObservable.js:178
    error RelayObservable.js:553
    error RelayObservable.js:553
    error RelayReplaySubject.js:105
    error RelayReplaySubject.js:104
    error fetchQueryInternal.js:126
    error RelayObservable.js:553
    error RelayObservable.js:553
    _error RelayModernQueryExecutor.js:190
    error RelayModernQueryExecutor.js:85
    error RelayObservable.js:553

And the OpenCTI logfile is flooded with:

{"message":"Int cannot represent non-integer value: { value: 0, relation: \"eq\" }","locations":[{"line":23,"column":7}],"path":["threatActors","pageInfo","globalCount"],"extensions":{"code":"INTERNAL_SERVER_ERR
OR","exception":{"stacktrace":["TypeError: Int cannot represent non-integer value: { value: 0, relation: \"eq\" }","    at GraphQLScalarType.serializeInt [as serialize] (/var/www/opencti/node_modules/graphql/typ
e/scalars.js:43:11)","    at completeLeafValue (/var/www/opencti/node_modules/graphql/execution/execute.js:652:37)","    at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:598:12)","
 at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:576:21)","    at completeValueCatchingError (/var/www/opencti/node_modules/graphql/execution/execute.js:514:19)","    at resolveField
 (/var/www/opencti/node_modules/graphql/execution/execute.js:454:10)","    at executeFields (/var/www/opencti/node_modules/graphql/execution/execute.js:294:18)","    at collectAndExecuteSubfields (/var/www/openc
ti/node_modules/graphql/execution/execute.js:730:10)","    at completeObjectValue (/var/www/opencti/node_modules/graphql/execution/execute.js:720:10)","    at completeValue (/var/www/opencti/node_modules/graphql
/execution/execute.js:609:12)","    at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:576:21)","    at completeValueCatchingError (/var/www/opencti/node_modules/graphql/execution/execu
te.js:514:19)","    at resolveField (/var/www/opencti/node_modules/graphql/execution/execute.js:454:10)","    at executeFields (/var/www/opencti/node_modules/graphql/execution/execute.js:294:18)","    at collect
AndExecuteSubfields (/var/www/opencti/node_modules/graphql/execution/execute.js:730:10)","    at completeObjectValue (/var/www/opencti/node_modules/graphql/execution/execute.js:720:10)"]}},"level":"error"}
{"message":"Int cannot represent non-integer value: { value: 0, relation: \"eq\" }","locations":[{"line":23,"column":7}],"path":["threatActors","pageInfo","globalCount"],"extensions":{"code":"INTERNAL_SERVER_ERR
OR","exception":{"stacktrace":["TypeError: Int cannot represent non-integer value: { value: 0, relation: \"eq\" }","    at GraphQLScalarType.serializeInt [as serialize] (/var/www/opencti/node_modules/graphql/typ
e/scalars.js:43:11)","    at completeLeafValue (/var/www/opencti/node_modules/graphql/execution/execute.js:652:37)","    at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:598:12)","
 at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:576:21)","    at completeValueCatchingError (/var/www/opencti/node_modules/graphql/execution/execute.js:514:19)","    at resolveField
 (/var/www/opencti/node_modules/graphql/execution/execute.js:454:10)","    at executeFields (/var/www/opencti/node_modules/graphql/execution/execute.js:294:18)","    at collectAndExecuteSubfields (/var/www/openc
ti/node_modules/graphql/execution/execute.js:730:10)","    at completeObjectValue (/var/www/opencti/node_modules/graphql/execution/execute.js:720:10)","    at completeValue (/var/www/opencti/node_modules/graphql
/execution/execute.js:609:12)","    at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:576:21)","    at completeValueCatchingError (/var/www/opencti/node_modules/graphql/execution/execu
te.js:514:19)","    at resolveField (/var/www/opencti/node_modules/graphql/execution/execute.js:454:10)","    at executeFields (/var/www/opencti/node_modules/graphql/execution/execute.js:294:18)","    at collect
AndExecuteSubfields (/var/www/opencti/node_modules/graphql/execution/execute.js:730:10)","    at completeObjectValue (/var/www/opencti/node_modules/graphql/execution/execute.js:720:10)"]}},"level":"error"}
{"message":"Int cannot represent non-integer value: { value: 0, relation: \"eq\" }","locations":[{"line":23,"column":7}],"path":["sectors","pageInfo","globalCount"],"extensions":{"code":"INTERNAL_SERVER_ERROR","
exception":{"stacktrace":["TypeError: Int cannot represent non-integer value: { value: 0, relation: \"eq\" }","    at GraphQLScalarType.serializeInt [as serialize] (/var/www/opencti/node_modules/graphql/type/sca
lars.js:43:11)","    at completeLeafValue (/var/www/opencti/node_modules/graphql/execution/execute.js:652:37)","    at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:598:12)","    at c
ompleteValue (/var/www/opencti/node_modules/graphql/execution/execute.js:576:21)","    at completeValueCatchingError (/var/www/opencti/node_modules/graphql/execution/execute.js:514:19)","    at resolveField (/va
r/www/opencti/node_modules/graphql/execution/execute.js:454:10)","    at executeFields (/var/www/opencti/node_modules/graphql/execution/execute.js:294:18)","    at collectAndExecuteSubfields (/var/www/opencti/no
de_modules/graphql/execution/execute.js:730:10)","    at completeObjectValue (/var/www/opencti/node_modules/graphql/execution/execute.js:720:10)","    at completeValue (/var/www/opencti/node_modules/graphql/exec
ution/execute.js:609:12)","    at completeValue (/var/www/opencti/node_modules/graphql/execution/execute.js:576:21)","    at completeValueCatchingError (/var/www/opencti/node_modules/graphql/execution/execute.js
:514:19)","    at resolveField (/var/www/opencti/node_modules/graphql/execution/execute.js:454:10)","    at executeFields (/var/www/opencti/node_modules/graphql/execution/execute.js:294:18)","    at collectAndEx
ecuteSubfields (/var/www/opencti/node_modules/graphql/execution/execute.js:730:10)","    at completeObjectValue (/var/www/opencti/node_modules/graphql/execution/execute.js:720:10)"]}},"level":"error"}

Additional information

/

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fr33tuxcommented, Jul 17, 2019

Sorry for the delay.

I confirm Elasticsearch 6.x fixes the issue, thanks!

1reaction
richard-juliencommented, Jul 8, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Expected type Int. Int cannot represent non-integer value ...
I think the problem is you've passed a string value "232214336" when an Int value is expected as the error says Expected type...
Read more >
Int cannot represent non-integer value. Incorrect Int Scalar type.
Trying to serialize count query I receive: "Int cannot represent non-integer value: { low: 2000, high: 0 }" where 2000 is the expected...
Read more >
Int cannot represent non integer value - YouTube
Your browser can't play this video. Learn more. Switch camera ... Int cannot represent non integer value - using apolloGraphql and React js....
Read more >
graphql - UNPKG
31, throw new GraphQLError("Int cannot represent non-integer value: ... Int can represent values between -(2^31) and 2^31 - 1.',.
Read more >
graphql error: int cannot represent non-integer value: { low ...
error: graphql error: int cannot represent non-integer value: { low: 748325812, high: 0, unsigned: false }. Add Answer | View In TPC Matrix....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found