[SOLVED] The return of TypeError: config._d.getTime is not a function. (In 'config._d.getTime()', 'config._d.getTime' is undefined)

As I’m upgrading from sdk30 to sdk32 (after correcting all other problems), I have this new strange error

TypeError: config._d.getTime is not a function. (In 'config._d.getTime()', 'config._d.getTime' is undefined)

This error is located at:
in FameMore (at connectAlert.js:11)
in ConnectedAlert (at withNavigation.js:17)
in withNavigation(ConnectedAlert) (created by Connect(withNavigation(ConnectedAlert)))
in Connect(withNavigation(ConnectedAlert)) (at FameTop.js:122)
in RCTView (at View.js:44)
in FameTop (at withNavigation.js:17)
in withNavigation(FameTop) (at connectAlert.js:11)
in ConnectedAlert (created by Connect(ConnectedAlert))
in Connect(ConnectedAlert) (at FamePensees.js:41)
in RCTView (at View.js:44)
in FamePensees (created by Connect(FamePensees))
in Connect(FamePensees) (at FameHomeView.js:309)
in RCTView (at View.js:44)
in CellRenderer (at VirtualizedList.js:687)
in RCTScrollContentView (at ScrollView.js:852)
in RCTScrollView (at ScrollView.js:977)
in ScrollView (at VirtualizedList.js:1062)
in VirtualizedList (at FlatList.js:662)
in FlatList (at FameHomeView.js:475)
in RCTView (at View.js:44)
in FameHomeView (at connectAlert.js:11)
in ConnectedAlert (created by Connect(ConnectedAlert))
in Connect(ConnectedAlert) (at ReactMeteorData.js:88)
in ReactMeteorDataComponent (at Home.js:339)
in RCTView (at View.js:44)
in KeyboardAvoidingView (at Home.js:333)
in RCTView (at View.js:44)
in Container (at Home.js:330)
in Home (at connectAlert.js:11)
in ConnectedAlert (at withNavigation.js:17)
in withNavigation(ConnectedAlert) (created by Connect(withNavigation(ConnectedAlert)))
in Connect(withNavigation(ConnectedAlert)) (at SceneView.js:17)
in SceneView (at CardStack.js:466)
in RCTView (at View.js:44)
in AnimatedComponent (at Card.js:12)
in Card (at PointerEventsContainer.js:39)
in Container (at CardStack.js:498)
in RCTView (at View.js:44)
in RCTView (at View.js:44)
in CardStack (at CardStackTransitioner.js:67)
in RCTView (at View.js:44)
in Transitioner (at CardStackTransitioner.js:19)
in CardStackTransitioner (at StackNavigator.js:41)
in Unknown (at createNavigator.js:13)
in Navigator (at createNavigationContainer.js:226)
in NavigationContainer (at AppWithNavigationState.js:66)
in App (created by Connect(App))
in Connect(App) (at app/index.js:242)
in RCTView (at View.js:44)
in AlertProvider (at app/index.js:241)
in Provider (at app/index.js:240)
in AppContainer (at ReactMeteorData.js:88)
in ReactMeteorDataComponent (at withExpoRoot.js:22)
in RootErrorBoundary (at withExpoRoot.js:21)
in ExpoRootComponent (at renderApplication.js:34)
in RCTView (at View.js:44)
in RCTView (at View.js:44)
in AppContainer (at renderApplication.js:33)

Moment
moment.js:238:47
clone
moment.js:3202:26
toISOString
moment.js:3332:22
send
socket.js:15:38
<unknown>
ddp.js:44:25
process
queue.js:21:32
push
queue.js:16:4
method
ddp.js:108:27
_default
Call.js:9:29
componentDidMount
FameMore.js:37:18
commitLifeCycles
ReactNativeRenderer-dev.js:12144:10
commitAllLifeCycles
ReactNativeRenderer-dev.js:13496:8
invokeGuardedCallbackImpl
ReactNativeRenderer-dev.js:92:15
invokeGuardedCallback
ReactNativeRenderer-dev.js:306:36
commitRoot
ReactNativeRenderer-dev.js:13702:8
completeRoot
ReactNativeRenderer-dev.js:15269:13
performWorkOnRoot
ReactNativeRenderer-dev.js:15197:21
performWork
ReactNativeRenderer-dev.js:15090:24
performSyncWork
ReactNativeRenderer-dev.js:15047:14
batchedUpdates$1
ReactNativeRenderer-dev.js:15315:21
batchedUpdates
ReactNativeRenderer-dev.js:2616:31
_receiveRootNodeIDEvent
ReactNativeRenderer-dev.js:2711:17
receiveTouches
ReactNativeRenderer-dev.js:2787:28
callFunction
MessageQueue.js:349:47
<unknown>
MessageQueue.js:106:26 guard
MessageQueue.js:297:10
callFunctionReturnFlushedQueue
MessageQueue.js:105:17

At FameMore: 37, there is a meteor call

Meteor.call('Contacts.isFollowing', { userId: this.props.userId, followerId: this.props.top.userId }, (err, isFollowing) => {

Then it goes inside react-native-meteor and seems to crash inside the socket call, line 15

send(object) {
    if (!this.closing) {
      const message = EJSON.stringify(object);
      this.rawSocket.send(message);
      // Emit a copy of the object, as the listener might mutate it.
      this.emit('message:out', EJSON.parse(message));
    }
  }

EJSON doesn’t have “moment” nor react-native-meteor …
Any idea ? Thank you …

Ejected app, expo diagnostics

    System:
      OS: macOS High Sierra 10.13.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.9.4 - /usr/local/bin/node
      Yarn: 1.13.0 - ~/.yarn/bin/yarn
      npm: 5.6.0 - /usr/local/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      expo: 32.0.6 => 32.0.6 
      react: 16.5.0 => 16.5.0 
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1 
      react-navigation: 2.18.2 => 2.18.2 
    npmGlobalPackages:
      expo-cli: 2.11.2

@alanrogger007 are you a growth hacker or a bot ?
I think you are a bot (sorry if not, I failed at Turing’s test) : the provided link is not related to the issue (chrome, w10), you just registered few minutes ago and this is your first post.
but very well done as it built a correct sentence with text from the title, maybe it is a real growth hacker from the site :wink:
I flagged the post for further investigation by forum’s admin.

I’ve downgrading to sdk30 and the same error pops up. Diff between package.json :

diff package.json /tmp/package-sdk30-rollback.json 
3c3
<   "version": "0.30.6",
---
>   "version": "0.30.18",
6,8c6,8
<     "babel-eslint": "8.2.6",
<     "babel-jest": "23.4.2",
<     "babel-plugin-transform-class-properties": "6.24.1",
---
>     "@babel/core": "^7.0.0",
>     "@babel/runtime": "7.3.1",
>     "babel-eslint": "^9.0.0",
10c10,12
<     "eslint": "5.9.0",
---
>     "babel-jest": "24.1.0",
>     "babel-plugin-transform-class-properties": "6.24.1",
>     "eslint": "4.19.1",
13,15c15,17
<     "eslint-plugin-import": "2.14.0",
<     "eslint-plugin-jsx-a11y": "6.1.2",
<     "eslint-plugin-react": "7.11.1",
---
>     "eslint-plugin-import": "2.16.0",
>     "eslint-plugin-jsx-a11y": "6.2.1",
>     "eslint-plugin-react": "7.12.4",
17c19
<     "prettier": "1.15.3",
---
>     "prettier": "1.16.4",
20,21c22
<     "react-native-scripts": "1.14.0",
<     "react-test-renderer": "16.6.3",
---
>     "react-test-renderer": "16.8.2",
24c25
<   "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
---
>   "main": "node_modules/expo/AppEntry.js",
26,29c27,30
<     "start": "react-native-scripts start",
<     "eject": "react-native-scripts eject",
<     "android": "react-native-scripts android",
<     "ios": "react-native-scripts ios",
---
>     "start": "expo start",
>     "eject": "expo eject",
>     "android": "expo android",
>     "ios": "expo ios",
41,42c42,43
<     "@expo/vector-icons": "6.3.1",
<     "assets": "3.0.0",
---
>     "@expo/vector-icons": "^8.0.0",
>     "assets": "3.0.1",
45c46
<     "expo": "30.0.1",
---
>     "expo": "30.0.0",
47c48
<     "hoist-non-react-statics": "3.2.0",
---
>     "hoist-non-react-statics": "3.3.0",
49c50
<     "moment": "2.22.2",
---
>     "moment": "2.24.0",
51c52
<     "prop-types": "15.6.2",
---
>     "prop-types": "15.7.2",
54c55
<     "react-native-dropdownalert": "3.7.1",
---
>     "react-native-dropdownalert": "3.9.2",
57c58
<     "react-native-extended-stylesheet": "0.10.0",
---
>     "react-native-extended-stylesheet": "0.11.1",
59,60c60,61
<     "react-native-iap": "2.3.19",
<     "react-native-keyboard-aware-scroll-view": "0.7.4",
---
>     "react-native-iap": "2.4.1",
>     "react-native-keyboard-aware-scroll-view": "0.8.0",
67c68
<     "react-native-offline": "3.14.1",
---
>     "react-native-offline": "3.15.1",
69a71
>     "react-native-scripts": "^2.0.1",
71c73
<     "react-native-sentry": "0.39.1",
---
>     "react-native-sentry": "0.42.0",
79c81
<     "sentry-expo": "1.10.0",
---
>     "sentry-expo": "~1.9.0",

I will try to downgrade moment at version 2.22.2 …

Hey @lc3t35,

Did downgrading moment versions provide any further insight?

Cheers,
Adam

Downgrading to moment 2.22.2, same error. @adamjnav any idea welcome !

expo diagnostics

  Expo CLI 2.11.3 environment info:
    System:
      OS: macOS High Sierra 10.13.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.9.4 - /usr/local/bin/node
      Yarn: 1.13.0 - ~/.yarn/bin/yarn
      npm: 5.6.0 - /usr/local/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      expo: 32.0.6 => 32.0.6 
      react: 16.5.0 => 16.5.0 
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1 
      react-navigation: 1.5.11 => 1.5.11 
    npmGlobalPackages:
      expo-cli: 2.11.3

I have now the code that generates this error

moment(latestExpiresDate).isAfter(moment())

with latestExpiresDate as undefined …
Documentation states

Note: Function parameters default to undefined when not passed in. Moment treats moment(undefined) as moment().

But moment seems not to work as expected in this case …

For now I’ve intercept the case when latestExpiresDate is undefined … so it shouldn’t throw the error