I'm having the same issue. Here are the steps that I take to recreate the issue and what I've done to try and troubleshoot it...
- Create replica in fgdb format via the REST API (createReplica) of a hosted feature service
- I also exported to fgdb from the Item Details page in AGOL from web browser and got same results
- Download zipped fgdb and unzip
- Try to view attribute table in ArcGIS Pro Catalog View in the preview
- can see how many features there are, but can't see field names or field values
- Add feature class to a map, can view features in the map
- Can't view features in attribute table
- Get an error when trying to access Design->Fields for feature class
- Export fgdb using the ExportXMLWorkspaceDocument GP tool
- this completes successfully with any parameters I give it
- I validate the XML with several validators and it checks out
- I also did a cursory inspection of the XML and didn't see anything odd
- If I try to use ImportXMLWorkspaceDocument, I get an 'Invalid XML file' error
- using python I can do the following
- read the feature class into a spatially enabled data frame
- create a list of feature classes using ListFeatureClasses
- create a list of fields in a feature class using ListFields
- view all Field properties like name, aliasName, defaultValue, etc.
- everything looks normal after inspecting the above
My only workaround at this point to be able to access this data in a 'working' fgdb in ArcGIS Pro is to use a third party tool (Enterprise Architect) to rebuild the fgdb for me. The steps I take to do this are:
- Use ExportXMLWorkspaceDocument to export my fgdb to xml
- Use Enterprise Architect
- import from XML to create a Enterprise Architect project
- export from Enterprise Architect project to xml
- Use ImportXMLWorkspaceDocument to import from the xml from Enterprise Architect to create a new fgdb with same schema as the original one
- Use Append GP tool to append all features from the original 'bad' fgdb to my recreated 'working' fgdb
- this works, but it recreates the GlobalIDs for all features when I do the Append
- this is an issue because there are some relationships that depend on the GlobalID for PK/FK relationships
- and the preserveGlobalIds environment setting only works for enterprise geodatabases
So, it looks like I'm going to submit a support ticket with Esri to see if they can figure out why certain fgdb's experience this behavior. Based on the above, the only odd thing in my feature service are some weird default values (-2209161600000 Update - this shouldn't really be an issue since this is really just 12/30/1899) for date fields that I'm not sure how they got there. These aren't default values for the Editor Tracking date fields, but for other date fields. When I inspect fields via python or ArcCatalog, I don't see these default values. They also don't show up in the XML as default values, it only shows up in the GDB_ServiceItems table in the xs:string for each Record in the fgdb.
UPDATE 6/22/2020: Thanks to Bert Kraan, I pinpointed my issue to the default values for those date fields. For some reason these default values cause issues in ArcGIS Pro and it hasn't been addressed yet in 2.5.0 or 2.5.1. If this happens to someone else, I've got two workarounds.
- Use ArcCatalog to reset the default values. This is quirky. I had to go to the layer properties->Fields, type NULL into the default value box, hit Apply, go back to the same field and delete the '-2209161600000' that shows up in that box after hitting Apply, then hit Apply again. This needed to be repeated one by one for each date field that had that default value.
- Use python to iterate through the feature classes in my fgdb, then iterate through fields. If the field had that default value, I used AssignDefaultToField to clear the default and set it to Null.
Once I did either of the workarounds, I was able to view the attribute tables in ArcGIS Pro.
UPDATE 6/23/2020: Esri support has confirmed for me the existence of BUG-000126591 - "Unable to view the attribute table after exporting the hosted feature service as a file geodatabase consisting of a date field." The bug is currently in the product plan and seems to effect ArcGIS Pro versions 2.4.2 to 2.5.1. Another workaround that support mentioned was exporting to shapefile, but that doesn't work for me due to relationships and long field names.