I had added an Layer and want to display the Attribute Table. I added the Attribute Table widget and I can view the Layer and its Attribute Table fields.
The layer needs ti support query operation to display in Attribute Table Widget. Make sure the query cpapbility in the service is turned on.
Query: How to turn on the Query capability in service turned on?
Are you reading the "said" layer from your on-premise ArcGIS Server (Mapserver: FeatureLayer)?, if so then you need to go back to the service properties (via ArcGIS Catalog or ArcGIS Server Manager) > then Capabilities > Mapping > Operations allowed: "tick the "Query Checkbox"
Edit: Don't forget to restart the map service afterwards
In case this helps anyone, my hosted layer had this issue until I found this setting in the "Settings" tab on the item page. For me it had been enabled somewhere along the way following instructions to configure a _fieldworker view layer for my Portal Survey123.
Changing it from "Editors can't see any features, even those they add" to "Editors can see all features" resolved this error.