question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to remove portal

See original GitHub issue

@gorhom/portal”: “^1.0.0”

I keep getting the following error in React Native

Failed to remove portal ‘1mrgf5_Wbp0kwl8wjzX1w’, ‘autocomplete_section_list’ was not registered! at PortalProviderComponent

Here is the snippet of code where the issue occurs

          <React.Fragment>
                <PortalHost name="autocomplete_section_list" />
                <View style={{ marginBottom: 10 }}>
                    <TextInput
                        autoFocus
                        isDisabled={isDisabled}
                        isRequired={isRequired}
                        label={label}
                        value={value}
                        placeholder={placeholder}
                        onChangeText={onChange}
                        onFocus={() => setHideResults(false)}
                        onBlur={onBlurTextInput}
                        startAdornment={startAdornment}
                        endAdornment={endAdornment}
                        style={style}
                    />
                    {
                        isFetching && (
                            <View style={[theme.selectList, styles.sectionList, styles.loading]}>
                                <Text style={theme.text}>Loading...</Text>
                            </View>
                        )
                    }
                    {
                        !hideResults && !isFetching && (
                            <Portal hostName="autocomplete_section_list">
                                <View style={styles.sectionList}>
                                    <SectionList
                                        sections={options}
                                        keyExtractor={(item) => item.label}
                                        renderItem={renderOption}
                                        renderSectionHeader={renderSectionHeader}
                                        keyboardShouldPersistTaps="always"
                                    />
                                </View>
                            </Portal>
                        )
                    }
                </View>
            </React.Fragment>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gorhomcommented, Feb 26, 2021

@mattlubner yeah , i properly need to throw an error if a user updated any name ( for portal or host )

1reaction
mattlubnercommented, Feb 25, 2021

Any chance hostName="autocomplete_section_list" is being dynamically generated (**in your actual code)?

I was glancing at the code earlier and noticed Portal’s useEffect for unmounting doesn’t list any deps, meaning any changes to the Portal’s name or hostName props could potentially be breaking the call to removePortal.

https://github.com/gorhom/react-native-portal/blob/master/src/components/portal/Portal.tsx#L39

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when uninstalling Portals solutions - Dynamics 365 Sales
This article provides a solution to a dependency error that occurs when you try to uninstall Portals solutions from Microsoft Dynamics 365.
Read more >
Problem: Unable to delete a detached item in Portal for ArcGIS
Log in to Portal for ArcGIS > My Content. Open the Item Details page for the items to be deleted. Note the Item...
Read more >
Troubleshooting: Remove a WebSphere Portal profile
View troubleshooting information for creating a HCL Portal profile.
Read more >
RHEL8 Unable to remove repo - Red Hat Customer Portal
[root@]# yum repolist all. Updating Subscription Management repositories. repo id repo name status ansible-2-for-rhel-8-x86_64-rpms Red Hat ...
Read more >
Removing an ArcGIS Server site from your portal
If you don't want your server to be federated with Portal for ArcGIS anymore, remove the federated server using the portal website.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found