Polymer Firebase image upload error - polymer

I have my firebase app config as so
<!-- NOT THE REAL VALUES --->
<firebase-app
auth-domain="<auth domain>"
database-url="https:DATABASE url"
api-key="API KEY"
storageBucket= "thebucket.appspot.com">
</firebase-app>
Each time I try an image upload I get the following error
"Firebase Storage: No default bucket found. Did you set the 'storageBucket' property when initializing the app?"
I dont understand as the storage Bucket property is there.

Related

How to add a new app setting to Azure Web App using pulumi without removing the existing settings?

I'm using pulumi azure native for infrastructure as code. I need to create an Azure Web App (based on an App Service Plan) and add some app settings (and connection strings) throughout the code, e.g., Application Insights instrumentation key, Blob Storage account name, etc.
I figured out that there is a method, WebAppApplicationSettings, that can update web app settings:
from pulumi_azure_native import web
web_app = web.WebApp(
'my-web-app-test123',
...
)
web.WebAppApplicationSettings(
'myappsetting',
name=web_app.name,
resource_group='my-resource-group',
properties={'mySetting': 123456},
opts=ResourceOptions(depends_on=[web_app])
)
It turns out that WebAppApplicationSettings replaces the entire app settings with the value given in the properties parameter, which is not what I need. I need to append a new setting to the existing settings.
So, I tried this:
Fetch the existing settings from web app using list_web_app_application_settings_output
Add the new settings the existing settings
Update the app settings using WebAppApplicationSettings
from pulumi_azure_native import web
app = web.WebApp(
'my-web-app-test123',
...
)
current_apps_settings = web.list_web_app_application_settings_output(
name=web_app.name,
resource_group_name='my-resource-group',
opts=ResourceOptions(depends_on=[web_app])
).properties
my_new_setting = {'mySetting': 123456}
new_app_settings = Output.all(current=current_apps_settings).apply(
lambda args: my_new_setting.update(args['current'])
)
web.WebAppApplicationSettings(
'myappsetting',
name=app.name,
resource_group='my-resource-group',
properties=new_app_settings,
opts=ResourceOptions(depends_on=[web_app])
)
However, this doesn't work either and throws the following error during pulumi up:
Exception: invoke of azure-native:web:listWebAppApplicationSettings failed: invocation of azure-native:web:listWebAppApplicationSettings returned an error: request failed /subscriptions/--------------/reso
urceGroups/pulumi-temp2/providers/Microsoft.Web/sites/my-web-app-test123/config/appsettings/list: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="The Resource 'Microsoft.Web/sites/my-web-app-test123' under resource group 'pulumi-temp2' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
error: an unhandled error occurred: Program exited with non-zero exit code: 1
Is there way that I can add a new app setting to Azure Web App using pulumi without changing/removing the existing settings?
Here's a suboptimal workaround: App Configuration and Enable Azure Function Dynamic Configuration.
And as far as I can tell it comes with some drawbacks:
cold start time may increase
additional costs
care must be taken to avoid redundant calls (costly)
additional boilerplate code needed for every function app
Maybe there's a better way, I mean I hope there is, I just haven't found it yet either.
After some searching and reaching out to pulumi-azure-native people, I found an answer:
Azure REST API doesn't currently support this feature, i.e., updating a single Web App setting apart from the others. So, there isn't such a feature in pulumi-azure-native as well.
As a workaround, I stored (kept) all the app settings I needed to be added, updated, or removed in a dictionary throughout my Python script, and then I passed them to the web.WebAppApplicationSettings class at the end of the script so that they will be applied all at once to the Web App resource. This is how I solved my problem.

S3 error undefined (reading byteLength) for AWS AMPLIFY

I keep getting a
TypeError: Cannot read properties of undefined (reading 'byteLength')
Error when using AWS with Amplify.
It looks like the s3 bucket permissions were not created properly when I added the s3 through the Amplify CLI.
When I add the sample s3 bucket policy from https://docs.amplify.aws/lib/storage/getting-started/q/platform/js/
It still does not work.
AWSS3Provider - get signed url error TypeError: Cannot read properties of undefined (reading 'byteLength')
My Code to call it:
const res = await Storage.get("test.json");
This includes any Storage.list, Storage.put commands.
This leads me to believe it has trouble getting the key from storage. I have done it all through the cli which is puzzling.
When I add the sample s3 bucket policy
Question is: What do I add for the principal for an authenticated user? Does anyone have a sample?
The policies mentioned are to be attached to the IAM cognito roles Auth_Role and Unauth_Role (or however are the roles for the cognito users named) not the S3 bucket. Then the principal is the IAM role itself.
In theory you may attach the defined policies to the S3 bucket and define the principals as the Cognito roles for the authenticated and unauthenticated users

error when i change key field to any value other than " my-add-on" in atlassian-connect json file

I am developing an addon on Confluence cloud and I can upload this addon in the confluence cloud instance successfully and everything going well BUT when I modify the field key in Json file (atlassian-connect.json) which is the descriptor of my add-on like this:
From <<"key": "my-add-on",>> TO << "key": "any_caracter",>>
I get the following error message:
The add-on host returned HTTP response code 401 when we tried to
contact it during installation. Please try again later or contact the
add-on vendor.
Yooopi i found the solution
delete the "store.db" file which exist on the same directory of "app.js" and then it will be generated automatically again.
have nice day Geeks ^^

Google Cloud Deployment Manager: Setting project wide metadata

I'm trying to set project wide metadata using Google Cloud Deployment, and to the best of my understanding this would look like:
- name: metadata-customer-name
type: compute.v1.projects
properties:
items:
- key: customer_name
value: {{properties['project']}}
However this fails, with error:
Waiting for update operation-...-...-...-...failed.
ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation operation-...-...-...-: <ErrorValue
errors: [<ErrorsValueListEntry
code: u'INTERNAL_ERROR'
message: u"Code: '7653413665057094445'">]>
With a random error code.
Has anyone successfully set project wide metadata for Google Cloud Deployment Manager?
This is not available at this time.The Cloud Deployment documentation lists the supported resources and compute.v1.projects is not one of them.

KeePass, GoogleSync: "Error occurred while sending a direct message or getting the response"

When using KeePass with the GoogleSync plugin (to sync the keypass db with Google Drive), I somehow messed up my config and received this message on every sync attempt:
Error occurred while sending a direct message or getting the response
I think what I actually did was try to switch my Google API credentials (from one API key to another)
The user config saves a Google auth key. In my case I changed the API credentials I wanted to use, but it could become corrupted in other ways and there doesn't seem to be a mechanism in KeePass/GoogleSync to rectify it.
Exit KeePass
Delete (or backup to a different name) the file %LOCALAPPDATA%\Dominik_Reichl\KeePass[...]\[version]\user.config
Restart KeePass and it'll regenerate it with the correct config
Found my reference here:
http://sourceforge.net/p/kp-googlesync/discussion/general/thread/5dc763ba/