Unhandled promise rejection TypeError no default value

I’m getting this error only in Safari (Version 15.0 (15612.1.29.41.4, 15612) on mac with mobiscroll 4.10.3 Event Calendar component


It does not seem to occur in chrome or on ios. Any suggestions?

1 Like

Hi @Christopher_Oliver :wave:

Can you share some of your relevant code from which we can reproduce this issue?

We have the exact same problem with the Input and the Listview components. Currently we are using mobiscroll version 4.10.3.

The problem can currently only be reproduced in Safari version 15.0 (16612.1.29.41.4, 16612). The problem could not be reproduced in Chrome or Firefox.

Are there any other findings here?

[Error] TypeError: No default value
e (app.js:57057:26909)
(anonyme Funktion) (app.js:57057:227153)
checkShouldComponentUpdate (app.js:163111)
updateClassInstance (app.js:163633:89)
updateClassComponent (app.js:167529)
callCallback (app.js:150610)
dispatchEvent
invokeGuardedCallbackDev (app.js:150659)
invokeGuardedCallback (app.js:150714)
beginWork$1 (app.js:173625)
performUnitOfWork (app.js:172579)
workLoopSync (app.js:172552)
performSyncWorkOnRoot (app.js:172178)
performSyncWorkOnRoot
(anonyme Funktion) (app.js:161511)
unstable_runWithPriority (app.js:179933)
flushSyncCallbackQueueImpl (app.js:161506)
flushSyncCallbackQueue (app.js:161494)
batchedUpdates$1 (app.js:172284)
runReactions (app.js:144117)
endBatch (app.js:143757)
_endAction (app.js:142872)
executeAction (app.js:142816)
promiseReactionJob
1 Like

Same issue for me. I’m on mobiscroll/react 4.10. MacOS 10.15.7, Safari 15.

Cannot reproduce on safari < 15, or any firefox, chrome.

This happens with any mobiscroll component.
ListView, Switch, Cards, Selects, etc.

So I upgraded to 5.0.0-beta6

And the error message is bit more specific. But the error is coming from mobiscroll.

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

@Deepankar after you upgraded to v5 beta 6, the error message you are getting is because you are trying to use v4 components with v5. In this article, you can read more information about this topic.

@LukeD, @Deepankar if you could share a working example from which we can reproduce this issue, that would be helpful.

    <span>
        <Select
          buttons={[{
            icon:     sortOrder === 'asc' ? 'arrow-up2' : 'arrow-down2',
            handler:  this.onSetSortOrder,
            cssClass: 'action-link button is-transparent has-text-weight-medium',
          }]}
          headerText='header'
          responsive={{
            small:  { display: 'bottom' },
            custom: { breakpoint: 769, display: 'bubble', touchUi: false }
          }}
          display="bottom"
          theme="ios"
          data={[{ text: 'Title', value: 'title' },{ text: 'Available At', value: 'startAtUtc' }]}
          placeholder="Sort By"
          onSet={this.onSetSortKeys}
          value={sortKey}
        >
          <input className="is-hidden" />
          <button>Sort By</button>
        </Select>
   </span>

So this is inside our app. Then I visit the page containing this code, then I click on button to open the select options. Then when I select any value, it re-renders the component (including <Select />), that’s when this crash is happening.

Error details.

59%20PM

StackTrace:

The above error occurred in the <e> component:
... my components.

React Version: 16.13.1
@mobiscroll/react: 4.10.3

NOTE:
this happens for list view, switch, card. (I only tested these things)

@Deepankar Thanks for the code.
However I could not manage to reproduce the issue. I created a simple test app, please find it here.
To run it, use mobiscroll config react and yarn install or npm install, and yarn start or npm start.

The mobiscroll version is 4.10.9, but tried with 4.10.3 as well, and it works the same.

Please try to update the example to reproduce the error.