Skip to content

Project crashing if Bundler is not running on initial run. #52339

Description

@anujraghuvanshi

I recently upgraded project from 0.73.6 to 0.79.2. When the metro bundler is already not running and I run the project from Xcode and Press Reload on Error Screen Which says No Metro Bundle Url found, The app gets crashed on - assert(!currentInstance && "Only one instance allowed");

InstanceTarget& HostTarget::registerInstance(InstanceTargetDelegate& delegate) {
  assert(!currentInstance && "Only one instance allowed");
  currentInstance = InstanceTarget::create(
      executionContextManager, delegate, makeVoidExecutor(executorFromThis()));
  sessions.forEach(
      [currentInstance = &*currentInstance](HostTargetSession& session) {
        session.setCurrentInstance(currentInstance);
      });
  return *currentInstance;
}

Also there's diff in Dev Menu in New App and upgraded App. Which I want new only.

Here's the screenshot of DevMenu of new initialized app. (Bridgeless)

Image

My upgraded app

Image

What's wrong here and how should I fix this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions