I'm having problem with loading $schema in SPFx within my new web part for SP. Web part is working on benchmark.aspx but my whole manifest is not being processed so I can't set preconfiguredEntries and it's big problem for me.
error is:
Problems loading reference 'https://developer.microsoft.com/json-schemas/spfx/client-side-manifest-base.schema.json': Request vscode/content failed unexpectedly without providing any details.(768)
Any idea on this issue please?
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
"id": "56dab116-67ba-453f-883d-b7a11690e965",
"alias": "ReadListWebPart",
"supportedHosts": ["SharePointWebPart"],
"componentType": "Webpart",
"version": "1.0",
"manifestVersion": "2",
"requiresCustomScript": false,
"preconfiguredEntries": [{
"groupId": "5c03119e-3074-46fd-976b-c60198311f70",
"group": { "default": "Other" },
"title": { "default": "read-list" },
"description": { "default": "popis web party" },
"officeFabricIconFontName": "Page",
"properties": {
"vedouci_velke_foto": true,
"asistenti_pod_vedoucim": false,
"nazev_web_party": "To jsme my"
}
}]
}
I checked the manifest.json, will be the same as yours, have the following waring:
Then tested to access "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json" in my local, no problem, still can be accessed.
After this, I tested to output the preconfigured properties in React SPFX Web Part like this:
Props.ts
WebPart.ts
.tsx
Still able to output properties:
In conclusion, you can just igore this issue, it's still able to read preconfiguredEntries.
Related
I redeployed my (sideloaded) Teams app that implements a very simple bot that auto-messages rooms every day.
This was working for a long time, and I made a slight change so I needed to redeploy, remove from the Teams room, and add it back.
After I removed and tried to add it back (without changing any of the settings) I now get an error telling me "Manifest Parsing has failed"
I also get the following errors in my console log:
Manifest is below. This was 100% generated within Teams, and is not something I made edits to myself, so not sure why it's telling me it can't parse (some fields redacted):
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json",
"manifestVersion": "1.8",
"version": "1.0.0",
"id": "dbb36443-1bce-48e0-81d2-b30aa3698144",
"packageName": "com.prosourcer-teams",
"developer": {
"name": "MY NAME",
"websiteUrl": "URL",
"privacyUrl": "URL",
"termsOfUseUrl": "URL"
},
"icons": {
"color": "color.png",
"outline": "outline.png"
},
"name": {
"short": "ps-app",
"full": "ps-chatBot"
},
"description": {
"short": "short desc",
"full": "full desc"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "bfcb70de-e093-4733-b236-742eb3b0aad8",
"scopes": [
"personal",
"team",
"groupchat"
],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": [
"identity",
"messageTeamMembers"
],
"validDomains": [
"URL"
]
}
UPDATE: If I try to add the bot to an individual team, I also get the following error in my console. I have confirmed that appId is correct, not sure where I'm supposed to be setting my TeamsId:
If there's an existing installation somewhere still around it might be causing this. Try incrementing the version number. Currently it's 1.0.0, try bumping even to 1.0.1 or 1.1.0.
Update - maybe there's an issue in Teams - there is a question just before yours today with a similar issue - see "Manifest parsing has failed" when installing teams apps from App Studio . Sounds like an issue with Teams or App Studio. If so, you can try manually uploading the manifest to your internal company store.
Manually change the manifest version to 1.7 (down from 1.8). As of Oct 15, 2020 that is the work around.
manifestVersion": "1.7"
(The Teams App Studio app generates the manifest with version 1.8, but the Teams client parsing fails as you have also run into)
Can someone please let me know from where I can change this configuration so that it should refer from the CDN path instead of localhost
Below is my package-solution.json
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "mega-menu-sp-fx-client-side-solution",
"id": "8f49d75c-5a49-4657-b81b-0290f239350f",
"version": "10.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"features": [
{
"title": "Application Extension - Deployment of custom action.",
"description": "Deploys a custom action with ClientSideComponentId association",
"id": "0d2345df-2a49-4ce9-ba2d-bee7ad3e7a02",
"version": "10.0.0.0",
"assets": {
"elementManifests": [
"elements.xml",
"clientsideinstance.xml"
]
}
}
]
},
"paths": {
"zippedPackage": "solution/mega-menu-sp-fx.sppkg"
}
}
Below is my write-manifest.json
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "https://Mytenant.sharepoint.com/sites/MyTechTheme/MenuFiles"
}
I tried to figure out whats the issue. For publishing instead of gulp package-solution --ship I had used gulp package-solution so unless and until we don't mention --ship it wont take the references for CDN
So for deploying the package in SPO we need to use gulp bundle --ship and gulp package-solution --ship
As per this thread, to load SPFx assets from a CDN or SharePoint library, set the value of "includeClientSideAssets" to false.
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
...
"includeClientSideAssets": false,
...
}
}
I am trying to understand the provisioning process of Digital Twins and I am reading this doc: https://learn.microsoft.com/en-us/azure/digital-twins/tutorial-facilities-setup
But I can not follow the point in this section
however, I can not understand the response for "dotnet run GetOntologies"
Anyone can help me to understand better what are those values? and how are they related to "models are available"?
In Azure Digital Twins, the Ontology entity contains a set of all types and subtypes that can be used in your application. In your example the "Required" and "Default" ontology are enabled (this is by default). If you use the REST API to see what the "Default" ontology contains you get the following:
{
"id": 2,
"name": "Default",
"loaded": true,
"types": [
{
"id": 17,
"category": "SensorDataType",
"name": "Humidity",
"disabled": false,
"logicalOrder": 0
},
{
"id": 18,
"category": "SensorDataType",
"name": "Temperature",
"disabled": false,
"logicalOrder": 0
},
{
"id": 19,
"category": "SensorDataSubtype",
"name": "RoomHumidity",
"disabled": false,
"logicalOrder": 0,
"friendlyName": "Room Humidity"
}, // etc etc
As you can see in the example above, the ontology has basic definitions for the types of sensors/spaces/data types for things related to Smart Building scenarios. The BACnet and Advanced ontologies just add different and more specific types. When you set an ontology to 'enabled', you can start using those types/subtypes. You can check them out in the REST API with:
https://your-url.your-region.azuresmartspaces.net/management/api/v1.0/ontologies/3?includes=Types
I'm trying out Azure's API App service, and I have a valid Swagger schema exposed for the service to consume, following the documentation here. I can retrieve the Swagger schema at its endpoint both on my local server and once the API App is deployed, and I've updated my web.config file to include the application/json MIME type. My apiapp.json file is as follows:
{
"$schema": "http://json-schema.org/schema#",
"id": "apiapp.dlxdev",
"namespace": "microsoft.com",
"gateway": "/* gateway, copied from Azure portal */",
"version": "1.0.0",
"title": "DLX API App (Dev)",
"summary": "The developer version of the DLX API App.",
"author": "Daniel W. Hieber",
"endpoints": {
"apiDefinition": "/api.json",
"status": null
}
}
Even though my endpoint is defined as /api.json, when I go to the API Definition blade in the Azure Portal, it says Failed to get metadata for 'apiApp.dlxDev' from endpoint '/swagger/docs/v1': Failed status code: 'NotFound'. Response Body: 'Not Found'.. It seems as though Azure is still looking for my Swagger file at the default /swagger/docs/v1 endpoint rather than the /api.json endpoint I specified.
I've also tried creating a metadata folder and placing my Swagger schema there (renaming it to apiDefinition.swagger.json, following the documentation), and didn't have any luck with that either.
Any ideas where I'm going wrong? Why isn't Azure detecting the endpoint for my Swagger schema?
UPDATE 1
Now I receive the following error in the API Definition blade: #/definitions/: Cannot determine schema of data definition named ''. This doesn't appear to be a problem with the Swagger schema itself, since all of my schema references are formatted correctly, and the schema itself is valid.
UPDATE 2
One thing that I needed to do was restart the gateway under which my API app was being hosted. Restarting the gateway is what caused the error message to change. So I think the app is recognizing my Swagger schema now. But I'm still not sure why I'm getting the 'Cannot determine schema' error, since my schema is formatted correctly.
Now I receive the following error in the API Definition blade: >#/definitions/: Cannot determine schema of data definition named ''. This >doesn't appear to be a problem with the Swagger schema itself, since all of my >schema references are formatted correctly, and the schema itself is valid.
I believe Azure requires a default response defined in swagger for every operation. Perhaps double check that every operation has a default response and every response has a schema property which resolves to a valid schema in the definitions section.
Like:
"paths": {
"/Categories": {
"get": {
"tags": [
"Categories"
],
...
],
...
"responses": {
"200": {
"description": "EntitySet Categories",
"schema": {
"$ref": "#/definitions/NorthwindAPI.Models.Category"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/_Error"
}
}
},
...
"definitions": {
"NorthwindAPI.Models.Category": {
"properties": {
"CategoryID": {
"format": "int32",
"description": "CategoryID",
"type": "integer"
},
"CategoryName": {
"description": "CategoryName",
"type": "string"
},
"Description": {
"description": "Description",
"type": "string"
},
"Picture": {
"description": "Picture",
"type": "string"
}
}
},
"_Error": {
"properties": {
"error": {
"$ref": "#/definitions/_InError"
}
}
},
HTH,
Josh
I am attempting to use the module Search Autocomplete 7.x-4.0-alpha2.
I have added a form in the "search_autocomplete" configuration section.
It is enabled.
I created a view that returns taxonomy in json format.
Here is an example of the json output from the json view
[{
"value": "aquaculture",
"fields": {
"name_i18n": "aquaculture"
},
"group": {
"group_id": "aquaculture",
"group_name": "aquaculture"
}
}, {
"value": "climate change",
"fields": {
"name_i18n": "climate change"
},
"group": {
"group_id": "climatechange",
"group_name": "climate change"
}
}, {
"value": "coastal development",
"fields": {
"name_i18n": "coastal development"
},
"group": {
"group_id": "coastaldevelopment",
"group_name": "coastal development"
}
}, {
"value": "deforestation",
"fields": {
"name_i18n": "deforestation"
},
"group": {
"group_id": "deforestation",
"group_name": "deforestation"
}
}, {
"value": "extinction",
"fields": {
"name_i18n": "extinction"
},
"group": {
"group_id": "extinction",
"group_name": "extinction"
}
}]
I set the Suggestion Source to be the view. I used the autocomplete feature of it so I know that my "search autocomplete" suggestion source is configured right. The id selector of a form in a different view (not the json taxonomy one) is used. The permissions for the module are correct.
Now, when I load my view that has the search api form I see a little blue circle icon that is circling to the right of the search api form field. It is circling the whole time and no suggestions are ever populated in the search text box.
I know I have the right form configured because if I set a different form id for the "searchautocomplete" configuration and reload the view page, the circling blue circle is missing.
Does anyone have any idea what might be wrong?
UPDATE: I was going to my modules page and saw this error (i wasn't changing anything on the modules page, just going there) and saw the error on the top of the modules page regarding the Search Autocomplete module
Update: I changed the Search Autocomplete configuration section to not point to my json view but point to an outside url, http://google.com. Of course this is not a valid json endpoint, but I wanted to see if I could see it at least attempt to get it's json data from google.com. Watching through firebug has shown that it doesn't even attempt to go to google.com for it's json data. I think something similar is happening with my json views (it's just not even going there for the data).
That was probably due to a bug in the alpha-version? When you configure the JSON Endpoint by using the Views UI, you should see a list of items in the "preview"-section underneath. The items that are listed there should be the ones that appear as suggestions in the search.