RocketChat Livechat standalone preact app- Couldn't render livechat in browser - webpack-dev-server

I cloned the project Rocket.Chat.Livechat to run as standalone, installed dependncies ,while I do yarn dev , and it shows that ,
Local: http://somehost:someport
On Your Network: http://somehost:someport
Then in my browser when I try http://somehost:someport , ideally it should popup the livechat window??
I tried following too:
http://somehost:someport/livechat/1.0.0/rocketchat-livechat.min.js
but it shows
Cannot Get
Anything else should I do ??
Currently when I do this, I am getting the following error in browser console.:
Do the following error while I run the project can be a cause?

Related

Monaco Editor - Web Workers cannot be loaded in production build

I'm currently implementing the Monaco Editor from Microsoft (https://github.com/microsoft/monaco-editor), with a plugin for yaml validation, autocompletion, etc. . (https://github.com/remcohaszing/monaco-yaml) in our react js APP.
Maybe it is also important to tell you, that our authentication process gets managed via Keycloak.
When I'm running my code in development (React-scripts start) everything is working as expected.
I can create the editor, the schema gets implemented correctly and autocompletion is also working.
BUT as soon as I try to use the editor in PRODUCTION Build it seems that it cant load my workers correctly, following the editor is not working as it should.
I always get these errors in production:
I tried to use monaco-editor-webpack-plugin with React Rewired but it didnt have an positive effect either.
I also tried to use the worker loader to load the workers, but it also didnt help
Any more Ideas how I can fix this ? Has this to do something with CORS ? Because it tries to load files in a url? Or am I missing something ?
Thanks in advance
What I tried: Monaco Webpack Plugin, plain webpack, worker-loader
Expected Behaviour: Monaco Editor with Monaco Yaml working in production build.
Current behaviour: Working fine in development build, cannot load workers in production.
The problem was, that my keycloak (on a different port) rejected to load the working scripts. After handling this problems, the editor is working fine.

Can't get cordova videoplayer to work in a ionic react environment

I get the next error message
react_devtools_backend.js:4026 Native: tried calling VideoPlayer.play, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator

Cypress Test runner--- can I make the warning message for "Download the React DevTools for a better development experience" go away?

I am using Cypress to test a React app.
is there a way to make this warning message in my console go away:
Download the React DevTools for a better development experience: ...
you will note that I see this warning only when running the controlled Chrome instance, not when looking at the same app in the normal Chrome browser. (As well, I do have the React dev tools installed and activated in Chrome so it seems this message is a side effect of the Cypress test-runner)
Add this regex to the DevTools console filter input:
-/React.DevTools/

Yarn test failing - Network request failed

I created a react project using create-react-app however when ran yarn test to see if the initial tests pass I get
TypeError: Network request failed
at XMLHttpRequest.xhr.onerror (/home/ubuntu/wonderland/hackernews/node_modules/whatwg-fetch/fetch.js:436:16)
at XMLHttpRequest.callback.(anonymous function) (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:289:32)
at invokeEventListeners (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:219:27)
at invokeInlineListeners (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:166:7)
at EventTargetImpl._dispatch (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:122:7)
at EventTargetImpl.dispatchEvent (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:87:17)
at XMLHttpRequest.dispatchEvent (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:61:35)
at XMLHttpRequest.abort (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:405:16)
at Object.abort (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:315:13)
at RequestManager.close (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:146:21)
at Window.close (/home/ubuntu/wonderland/hackernews/node_modules/jsdom/lib/jsdom/browser/Window.js:362:29)
at JSDOMEnvironment.dispose (/home/ubuntu/wonderland/hackernews/node_modules/jest-environment-jsdom/build/index.js:44:19)
at Promise.resolve.then (/home/ubuntu/wonderland/hackernews/node_modules/jest-cli/build/runTest.js:102:17)
I'm working in Cloud9 editor using ssh connected to my dev server (Ubuntu) hosted in AWS. Tests are working fine in my local machine (Ubuntu).
Thanks for the help!
I already solve my problem. I'm following a book entitled "The Road to Learn React" and I think that the one causing my error is the part where I fetch data from an external API. The book forgot to include an import for fetch which is this one:
import fetch from 'isomorphic-fetch'
Then, it solves my problem like a charm.

Sencha touch build error when native packaging for ios !AMDeviceSecureInstallApplication

When i try to package my application natively for IOS in Sencha Touch 2.1 it gives me this error:
Sencha Cmd v3.0.0.250
[ERR]
!AMDeviceSecureInstallApplication
The application was successfully packaged
The application was successfuly signed
[ERR] stbuild exited with non-zero code : 1
It's not working with Xcode please any help will be appreciated.
This is my packager.json
{
"applicationName":"Demoedifarm",
"applicationId":"com.palapa.demoedifarm",
"bundleSeedId":"S5583Y6VFB",
"versionString":"1.0",
//"versionCode":"1",
"icon": {
"57":"resources/icons/Icon.png",
"72":"resources/icons/Icon~ipad.png",
"114":"resources/icons/Icon#2x.png",
"144":"resources/icons/Icon~ipad#2x.png"
},
"inputPath":"./",
"outputPath":"../build/",
"configuration":"Debug",
"platform":"iOS",
"deviceType":"iPad",
"certificateAlias":"iPhone Developer",
//"certificatePassword":"",
"provisionProfile":"/Users/palapa1/Library/MobileDevice/Provisioning Profiles/CA412FD2-60D6-407E-B7AD-A34637A8FF55.mobileprovision",
//"sdkPath":"/path/to/android-sdk",
//"sdkPath":"/path/to/android-sdk",
//"androidAPILevel":"8",
/*"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE",
"CAMERA",
"VIBRATE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CALL_PHONE"],*/
"minOSVersion": "4.2.1",
"orientations": [
"landscapeLeft",
"landscapeRight"
]
}
I'm running a more recent version of Sencha Cmd (3.1), and I believe the command syntax has changed slightly, but I hit this same error so I figured I'd put an answer out just in case it helps someone.
If I run the following command:
sencha app package run myConfigFile.json
Then it fails with the same error, and I don't know what the problem is. However if I change the config file so it is targeting the iOS Simulator (the 'platform' property) then it works fine (the simulator opens automatically).
If I run this command instead:
sencha app package build myConfigFile.json
Then it completes successfully, and I end up with a MyApp.app file in the output folder.
If I have the XCode Organizer window open, I can then drag this file onto the 'Applications' folder underneath my attached phone and it will deploy/install the app for me.
If you use a provisioning profile you need to set
"configuration":"Release"
instead of Debug in packager.json. That's a bug in the docs.
Also, see this post for a good tutorial: http://frightanic.com/software-development/sencha-touch-native-packaging-for-ios-done-right/

Resources