Flurry - Cannot read property 'initBuilder' of undefined - flurry

I am getting error while initating Flurry in react native!
react native version:
react-native-cli: 2.0.1
react-native: 0.59.10
watchman version: 4.9.0

I managed to solve this problem by these step on iOS:
1- I installed latest version of SDK by npm install react-native-flurry-sdk --save
2- I used Pod file like this one bellow :
platform :ios, '9.0'
target 'testproj' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for testproj
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # Needed for debugging
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-flurry-sdk', :path => '../node_modules/react-native-flurry-sdk/ios'
end
and in my case I used pod update, but if it's your first time that are using pod you need to use pod install
and that's it.
remeber when you are using pod you dont need to use react-native link, it makes problem.

Related

Unexpected attribute app_engine_apis error deploying Python 3 App Engine Flask app

I use Google App Engine standard environemment with Flask Python3 for a current project.
This project use as cache the App Engine Memcache (google.appengine.api.memcache).
Currently the cache doesn't work and I think that it's probably because of the dependency on App Engine APIs that need to be enable because when I try to deploy my app (gcloud app deploy) I have this warning: WARNING: There is a dependency on App Engine APIs, but they are not enabled in your app.yaml. Set the app_engine_apis property.
My issue is that when I try to set the dependancy in my app.yaml and deploy, I have then this error: Unexpected attribute 'app_engine_apis' for object of type AppInfoExternal.
I also tried with the exact same yaml file than the Google example: https://github.com/googlecodelabs/migrate-python2-appengine/blob/master/mod12b-memcache/app.yaml, it doesn't work.
Here the current app.yaml that I'm trying to use:
runtime: python39
env: standard
app_engine_apis: true
resources:
cpu: 2
memory_gb: 4
disk_size_gb: 15
manual_scaling:
instances: 2
This issue is almost the same as this question but I couldn't use it to solve my problem: How to deal with `app_engine_apis` warning when updating app.yaml from go114 to go115
Thank you for your help.
Your Google Cloud SDK is outdated. Per the comments in #NoCommandLine's answer, your SDK being version 300 is from Jul 2020 whereas the bundled services for 2nd-gen runtimes like Python 3 didn't go into private preview until Jun 2021. They became generally available in Sep 2021. If you run gcloud components update to get the latest SDK (at the time of this post, it's 410), you should be able to run gcloud app deploy to deploy a Python 3 App Engine app that can access the Memcache bundled service. TL;DR to using bundled services in Python 3:
Add app_engine_apis: true to app.yaml
Add appengine-python-standard to requirements.txt
Import the WSGI wrapper: from google.appengine.api import wrap_wsgi_app
Wrap your WSGI object (Flask): app = Flask(__name__); app.wsgi_app = wrap_wsgi_app(app.wsgi_app)
Review these instructions, esp. if you're not using Flask
Update your Cloud SDK: gcloud components update
NOTE: You no longer need to run pip install -t lib -r requirements.txt to vendor/self-bundle package dependencies... they're now automatically installed for Py3 users (but not Py2 though) when you deploy your app to the cloud.
I recently published a video & codelab (hands-on tutorial) on how to access the bundled services from "Gen2" but realize now I should've mentioned updating your SDK, meaning it covers almost all of the instructions above. :P
For those interested in eventually migrating off Memcache to something more powerful like Redis, I also published content on migrating from Memcache to Cloud Memorystore for Redis, relatively recently as well.
Your version of gcloud probably means the app_engine_apis are in the beta version and so you have to do
gcloud beta app deploy

RoR App: “The asset 'application.css' is not present in the asset pipeline”

Info:
Rails 6.1.4
Ruby 3.0.1
PostgreSQL 9.6
NodeJS 11.15.0
Yarn 1.22.5
when I start my APP I always got the same error:
I've tried all I saw in others posts but I can´t resolve this problem.
Any suggestions?
In config/environments/production.rb I added the following line:
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
also I checked the following line:
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
With this configuration I can start my APP.
Did you tried to do the following on the server
RAILS_ENV=production bundle exec rake assets:precompile

Running Nuxt.js in Docker Container build by Paketo.io / Cloud Native Buildpacks

I want to Containerize my Nuxt.js application. I could write my own Dockerfile (as mentioned in the Nuxt.js Google Cloud Run docs for example), but as Cloud Native Buildpacks are here to free us from the need to write those over and over again I wanted to simply use Paketo.io to build a Container from my Nuxt.js app.
I ran
pack build microservice-ui-nuxt-js --path . --builder paketobuildpacks/builder:base
and a Container was created successfully. Here's the full log:
$ pack build microservice-ui-nuxt-js --path . --builder paketobuildpacks/builder:base
base: Pulling from paketobuildpacks/builder
Digest: sha256:3e2ee17348bd901e7e0748e0e1ddccdf8a602b624e418927145b5f84ca26f264
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:b6b1612ab2dfa294514fff2750e8d724287f81e89d5e91209dbdd562ed7f7daf
Status: Image is up to date for paketobuildpacks/run:base-cnb
===> DETECTING
4 of 7 buildpacks participating
paketo-buildpacks/ca-certificates 2.2.0
paketo-buildpacks/node-engine 0.4.0
paketo-buildpacks/npm-install 0.3.0
paketo-buildpacks/npm-start 0.2.0
===> ANALYZING
Previous image with name "microservice-ui-nuxt-js" not found
===> RESTORING
===> BUILDING
Paketo CA Certificates Buildpack 2.2.0
https://github.com/paketo-buildpacks/ca-certificates
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
Paketo Node Engine Buildpack 0.4.0
Resolving Node Engine version
Candidate version sources (in priority order):
-> ""
<unknown> -> ""
Selected Node Engine version (using ): 14.17.0
Executing build process
Installing Node Engine 14.17.0
Completed in 5.795s
Configuring build environment
NODE_ENV -> "production"
NODE_HOME -> "/layers/paketo-buildpacks_node-engine/node"
NODE_VERBOSE -> "false"
Configuring launch environment
NODE_ENV -> "production"
NODE_HOME -> "/layers/paketo-buildpacks_node-engine/node"
NODE_VERBOSE -> "false"
Writing profile.d/0_memory_available.sh
Calculates available memory based on container limits at launch time.
Made available in the MEMORY_AVAILABLE environment variable.
Paketo NPM Install Buildpack 0.3.0
Resolving installation process
Process inputs:
node_modules -> "Not found"
npm-cache -> "Not found"
package-lock.json -> "Found"
Selected NPM build process: 'npm ci'
Executing build process
Running 'npm ci --unsafe-perm --cache /layers/paketo-buildpacks_npm-install/npm-cache'
Completed in 14.988s
Configuring launch environment
NPM_CONFIG_LOGLEVEL -> "error"
Configuring environment shared by build and launch
PATH -> "$PATH:/layers/paketo-buildpacks_npm-install/modules/node_modules/.bin"
Paketo NPM Start Buildpack 0.2.0
Assigning launch processes
web: nuxt start
===> EXPORTING
Adding layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/node-engine:node'
Adding layer 'paketo-buildpacks/npm-install:modules'
Adding layer 'paketo-buildpacks/npm-install:npm-cache'
Adding 1/1 app layer(s)
Adding layer 'launcher'
Adding layer 'config'
Adding layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
Saving microservice-ui-nuxt-js...
*** Images (5eb36ba20094):
microservice-ui-nuxt-js
Adding cache layer 'paketo-buildpacks/node-engine:node'
Adding cache layer 'paketo-buildpacks/npm-install:modules'
Adding cache layer 'paketo-buildpacks/npm-install:npm-cache'
Successfully built image microservice-ui-nuxt-js
Now running
docker run --rm -i --tty -p 3000:3000 microservice-ui-nuxt-js
i hoped to see my app inside the Browser at http://localhost:3000. But no luck! My app doesn't seem to be fully running:
Although my console looks good:
What am I missing?
I read about the HOST variable in this post , which the whole problem is about! And then I also found this answer, since I now knew what to look for. The Nuxt.js configuration docs state it also:
By default, the Nuxt.js development server host is localhost which is
only accessible from within the host machine. In order to view your
app on another device you need to modify the host.
And the crucial config is mentioned also:
Host '0.0.0.0' is designated to tell Nuxt.js to resolve a host
address, which is accessible to connections outside of the host
machine (e.g. LAN)
So all we have to do is to define a Docker environment variable --env "HOST=0.0.0.0" and run the Paketo build Container like this:
docker run --rm -i --tty --env "HOST=0.0.0.0" -p 3000:3000 microservice-ui-nuxt-js
Now the Browser should also show our app at http://localhost:3000:
You can try it yourself using the GitHub Container Registry published image of the example project:
docker run --rm -i --tty --env "HOST=0.0.0.0" -p 3000:3000 ghcr.io/jonashackt/microservice-ui-nuxt-js:latest

Installing pear package using puppet

I am trying to install the pear package "HTTP_Request2" using puppet. The target OS is RHEL 7.
I have come across 2 puppet modules that I believe should be able to do this
https://forge.puppetlabs.com/rafaelfc/pear
https://forge.puppetlabs.com/example42/php
Ideally I would like to use the refaelfc module as it seems more specialized for this task. The problem I have with this is that to gain internet access on the target server you need to go through a proxy, I can't seem to find anything in this module to set this. Without this set puppet just times out when trying to install the module.
Using option 2 I add the following to my manifest:
include php
php::pear::config { http_proxy: value => "http://xx.xx.xx.xx:xxxx" }
php::pear::module { 'HTTP_Request2':
repository => 'pear.phpunit.de',
alldeps => 'true',
require => Php::Pear::Config['http_proxy'],
}
When doing this I get the error:
Error: Execution of '/bin/yum -d 0 -e 0 -y list php-pear-HTTP_Request2' returned 1: Error: No matching Packages to list
It doesn't seem right to be that it should be calling on yum? How can I get puppet to install this pear package?
Managed to get it working using a combination of the example42/php module and a custom script:
include php
php::pear::config { http_proxy:
value => "http://xx.xx.xx.xx:xxxx",
}
exec { 'HTTP_Request2':
command => '/usr/bin/pear install HTTP_Request2',
unless => '/usr/bin/pear info HTTP_Request2',
require => Php::Pear::Config['http_proxy'],
}

Trying to get basic Nodejs example working on GAE

I'm using Windows 7x64, gcloud installed version
Google Cloud SDK 0.9.71
app 2015.07.24
app-engine-java 1.9.24
app-engine-python 1.9.24
app-engine-python-extras 1.9.21
bq 2.0.18
bq-win 2.0.18
core 2015.07.24
core-win 2015.07.24
gcloud 2015.07.24
gsutil 4.13
gsutil-win 4.13
preview 2015.07.24
windows-ssh-tools 2015.06.02
I'm trying to run on preview and deploy the tutorial example from here. Note that app.yaml from this example has "nodejs" set as runtime.
After running command
gcloud preview app run --host localhost:8080 app.yaml
I get
RuntimeError: Unknown runtime 'nodejs'; supported runtimes are 'custom', 'go', 'java', 'java7', 'php', 'php55', 'python, 'python27', 'vm'.
If I put "vm" for runtime it wants to use docker, which doesn't work for me either and I wanted to use the option to do this without docker anyhow.
If I put "custom" for runtime in yaml file I get:
ValueError: The --custom_entrypoint flag must be set for custom runtimes
Example given in the help output for this switch is the following
--custom_entrypoint="gunicorn -b localhost:{port} mymodule:application"
I tried with this, best guess
gcloud preview app run --custom_entrypoint="nodejs -b localhost:{8080} mymodule:application" app.yaml
and got this
ERROR: Argument [--custom_entrypoint=nodejs -b localhost:{8080} mymodule:application] is not a valid deployable file.
ERROR: (gcloud.preview.app.run) Errors occurred while parsing the App Engine app configuration.
Thanks for your time.
The gcloud command seems to be undergoing some changes, so this question seems no longer valid, since we're meant to run dev_appserver.py instead of gcloud to run devserver processes; you can also just straight-up run the node server, or even use docker to build the image from your dockerfile and run that as a container.
If running from dev_appserver.py, make sure you have runtime: custom and a Dockerfile sourcing FROMgcr.io/google_appengine/nodejs, since dev_appserver.py currently raises:
RuntimeError: Unknown runtime 'nodejs'; supported runtimes are 'custom', 'go', 'java', 'java-compat', 'java7', 'php55', 'python', 'python-compat', 'python27'.

Resources