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:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mattlubner yeah , i properly need to throw an error if a user updated any name ( for portal or host )
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
orhostName
props could potentially be breaking the call toremovePortal
.https://github.com/gorhom/react-native-portal/blob/master/src/components/portal/Portal.tsx#L39