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

Uncaught (in promise) Error: DeltaPatcher should receive a base Bundle when being initialized #24434

Closed
ahmedkheikal opened this issue Apr 13, 2019 · 5 comments
Labels
Bug Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@ahmedkheikal
Copy link

Description

When trying to run react-native run-android on a linux machine I get the above error,
The error is not related to hot reloading as it appears at the first attempt to debug the app

Code Example

import React, { Component } from 'react';
import { StatusBar, Dimensions, ImageBackground, Alert } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
import { View, Text, Spinner, Button } from 'native-base';
import { baseUrl } from '../shared/baseUrl';
import { User } from './Models/User';
import { GlobalFont } from 'react-native-global-font';

export default class Login extends Component {
    constructor(props) {
        super(props);
        this.state = {
            loading: true,
            phone: '',
            password: '',
            loginButtonContent: () => null
        }
    }
 ...........
            <View keyboardVerticalOffset={-100} behavior="padding" style={{ flex: 1 }}>
                <StatusBar translucent={true} backgroundColor="transparent" barStyle="light-content" />

                <ImageBackground
                    progressiveRenderingEnabled={true}
                    source={require('./images/login-background.png')}
                    resizeMode="cover"
                    style={{ padding: 0, borderRadius: 0, height: Dimensions.get('window').height, width: Dimensions.get('window').width, flex: 1, justifyContent: "center" }} >
                    <View style={{ padding: 36, paddingTop: Dimensions.get('window').height / 2, justifyContent: "center", flex: 1, margin: 0 }}>
 ..........
                    </View>
                </ImageBackground >
            </View>
        );
    }
}

Environment

React Native Environment Info:
System:
OS: Linux 4.14 Manjaro Linux undefined
CPU: (4) x64 Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
Memory: 375.55 MB / 7.69 GB
Shell: 4.4.23 - /bin/bash
Binaries:
Node: 10.10.0 - /usr/bin/node
npm: 6.4.1 - /usr/bin/npm
IDEs:
Android Studio: 3.3
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.1 => 0.59.1
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1

@react-native-bot react-native-bot added Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. Platform: Linux Building on Linux. labels Apr 13, 2019
@kelset
Copy link
Contributor

kelset commented May 3, 2019

Hello there 👋 this issue doesn't have a repro (which means, a react-native init-ed project with the minimal changes that leads to creating the same issue you are reporting). Unfortunately, I have no way of helping you in a meaningful way – there is no easy way for me to recreate the situation and check that the issue reported is still there when changing the code.

Also, it seems to be actually related to/caused by Metro, would you mind, after creating a repro, open an issue there? https://github.com/facebook/metro/

@muhammadali2012
Copy link

muhammadali2012 commented May 24, 2019

for me the error was because of faulty imports of component i.e in Correct Path or file name, in my case I was importing like
import xyz from 'Components/xyz'
instead of
import xyz from './Components/xyz'
Such a silly mistake but it wasted my whole day

@yasicmd
Copy link

yasicmd commented Jun 12, 2019

Closing the existing chrome debugger and opening a new one fixed for me.

@yogavigneshwaran
Copy link

Just kill the 'metro bundler' window and re-run the project ex: 'react-native run-android'. If you have debugger window open then refresh that too.

@argarner
Copy link

argarner commented Jul 31, 2019

This worked for me. Try starting from 6) first, to see if it really is just a case of needing to stash / pop changes. If that doesn't work start from 1):

  1. git stash ALL changes
  2. Refresh iOS (app loaded again, without issues, at latest git commit)
  3. pop / apply latest git stash (app loads and works fine without any changes to the code that broke the app.... ???)

  1. Close chrome debugger
  2. Close react-native electron debugger
  3. Kill any open processes (e.g. abd kill-server)
  4. On iOS emulator => menu > Hardware > "Erase All Content and Settings" > wait til emulator restarts
  5. react-native run-ios > wait till loads > still get same error appearing on refreshed iOS app!!!

@facebook facebook locked as resolved and limited conversation to collaborators May 3, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

7 participants