Malawi-DCCMS / weather-app

An app to show the weather.
0 stars 0 forks source link

Suppress unserializable warning #107

Closed havardf closed 3 months ago

havardf commented 3 months ago

As far as I can tell, its caused by sending DateTime object to Hourly screen. The hourly screen only uses that object to present information, hence it should be safe to ignore.

This warning:


 WARN  Non-serializable values were found in the navigation state. Check:

Hourly > params.daySummary.day._zone.constructor (Function)

This can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.
    at BaseNavigationContainer (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:171185:28)
    at ThemeProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:177002:21)
    at NavigationContainerInner (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:176890:26)
    at App
    at ThemeProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:168151:38)
    at RCTView
    at View (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:59793:43)
    at Portal.Host (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:165347:36)
    at RNCSafeAreaProvider
    at SafeAreaProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:157450:24)
    at SafeAreaProviderCompat (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:157350:24)
    at PaperProvider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:157242:37)
    at Provider (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:195587:21)
    at Main
    at RCTView
    at View (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:59793:43)
    at RCTView
    at View (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:59793:43)
    at AppContainer (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:59637:36)
    at Zanyengo(RootComponent) (http://localhost:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.weatherapp&modulesOnly=false&runModule=true:108387:28)```