cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Store App Settings In Dynatrace AppEngine App

zaid-bashir
Advisor

I was configuring the app settings in dynatrace appengine app, earlier i was able to get settings and also able to create settings. I updated the dt-app version to latest, Once I created fresh application and tried to create settings it was giving the below issue.

{"error":{"isApiClientError":true,"errorType":"Http Error","cause":{"name":"ResponseError","response":{"response":{}},"requestMethod":"GET"},"name":"400","isClientRequestError":true,"body":{"error":"Route not available in local-dev-mode"},"response":{"response":{}},"isAppSettingsErrorEnvelopeError":true},"errorDetails":"Route not available in local-dev-mode","isError":true,"isLoading":false,"isSuccess":false,"status":"error"}

 

For your information, I have already configured settings folder and the package "@dynatrace-sdk/dt-app-plugin-client-app-settings-v2" for local development.


4 REPLIES 4

haris
Dynatrace Mentor
Dynatrace Mentor

Hi Zaid,

can you share the app.config.ts file with me please? 

Hi @haris 
Here is my app.config file.

{
  "environmentUrl": "http://fob48074.apps.dynatrace.com/",
  "app": {
    "name": "user_and_group_management",
    "version": "0.0.0",
    "description": "A starting project with routing, fetching data, and charting",
    "id": "my.user.and.group.management",
    "scopes": [
      {
        "name": "storage:logs:read",
        "comment": "default template"
      },
      {
        "name": "storage:buckets:read",
        "comment": "default template"
      }
    ]
  },
  "plugins": [
    "@dynatrace-sdk/dt-app-plugin-client-app-settings-v2"
  ],
  "dev": {
    "fileWatcher": {
      "ignore": [
        "**/{permissions,secrets,values,values.shadow}.json"
      ]
    }
  }
}

 

zaid-bashir
Advisor

Hi @haris 
I am getting this issue while I am trying to run npx-dt-app dev.

Warning ──────────────────────────────────────────────────────────────────────────────────

  Failed to retrieve user details. App functions will use placeholder data.

──────────────────────────────────────────────────────────────────────────────────────────

Authenticated as z*******@y*********.ca


Warning ──────────────────────────────────────────────────────────────────────────────────

  The default csp policy from the platform couldn't be applied. App-registry failed with: 401 Unauthorized

──────────────────────────────────────────────────────────────────────────────────────────

Failed to validate D:/Dynatrace AppEngine Apps/license-consumption-revamp/settings/schemas/license-app.schema.json.
Validation call failed: Cannot read properties of undefined (reading 'error')

 

The plugins

client-app-settings-v2,
dt-app-plugin-client-app-settings-v2

generated settings folder and then i created schemas folder. It was working fine in earlier versions but in these v2 versions it shows the above error.

My app.config.json file is below:

{
  "environmentUrl": "http://******.apps.dynatrace.com/",
  "app": {
    "name": "app-demo",
    "version": "0.0.0",
    "description": "A starting project with routing, fetching data, and charting",
    "id": "my.*****.******.****",
    "scopes": [
      {
        "name": "storage:logs:read",
        "comment": "default template"
      },
      {
        "name": "storage:buckets:read",
        "comment": "default template"
      },
      {
        "name": "app-settings:objects:read",
        "comment": "Read app settings"
      }
    ]
  },
  "plugins": [
    "@dynatrace-sdk/dt-app-plugin-client-app-settings-v2"
  ],
  "dev": {
    "fileWatcher": {
      "ignore": [
        "**/{permissions,secrets,values,values.shadow}.json"
      ]
    }
  }
}

 

Hi Zaid,

can you please try adjusting the file like so:

"dev": {
		"fileWatcher": {
			"ignore": ["**/{secrets,values,values.shadow}.json"]
		}

Featured Posts