Squidex issue, Run the Webpack Dev Server and no login page - content-management-system

I checkout Squidex from stash and try to run in my local. I am trying to run the Webpack Dev Server. I follow the instruction from official website without any change.
npm i (Install all dependencies for the frontend)
npm rebuild node-sass --force
npm run dev (Runs the webpack vdev server)
but when I open localhost:3000 from browser and tried to click Login to Squidex,
I got below error and then the popup login page disappeared.
oidc-client.min.js:1 Error parsing JSON response Unexpected token < in JSON at position 0
I have no idea what I can do to fix it. I do nothing change on it and just checkout source code and run in my local.
Thanks for any suggestion.

The localhost:3000 is the webpack dev server. You have to run ASP.NET core app in VS2017 to start the Squidex app.
Ps. Don't forget to edit "baseUrl": "http://localhost:xxxx" in appsetting.json to match with your DEBUG url in Project > Properties.

Related

Why isn't my luminus app working on Heroku?

I'm a complete beginner and following this book: https://pragprog.com/titles/dswdcloj3/web-development-with-clojure-third-edition/
I followed the instructions about deploying to Heroku from the book and from here: https://luminusweb.com/docs/deployment.html#heroku_deployment but I'm having some issues.
Here is my problem and the steps I've taken. I'm using the source code from guestbook-controllers here and modifying it, just trying to get the app working in Heroku (ie able to make an account, log in and post a message). Here is my repo: https://github.com/johnbradens/guestbook-heroku
Here are my steps:
git init
git add .
git commit -m "initial commit"
I added a bin/build file and ran chmod u+x bin/build (based on instructions from https://folcon.github.io/post/2020-04-12-Fulcro-on-Heroku/, because it was saying that react wasn't installed)
I added heroku buildpacks nodejs & clojure (otherwise it said it couldn't read the npm from bin/build)
heroku addons:create heroku-postgresql
git push heroku main
This is what I see when I look at the Heroku app:
Error 1
Error 2
When I run heroku run lein run migrate I get the following error:
Syntax error compiling at (/tmp/form-init6415984187052473661.clj:1:73).
could not find a non empty configuration file to load. looked in the classpath (as a "resource") and on a file system via "conf" system property
I tried editing the env/prod/resources/config.edn but I'm not sure what to do with it. I tried a lot of things and none of them worked.
Here's an example of something I tried, in changing the env/prod/resources/config.edn file. One of the links above says to just have {:prod true} so that's what I have right now, but I also tried:
{:prod true
:port (System/getenv "PORT")
:database-url (System/getenv "JDBC_DATABASE_URL")
}
EDIT: I found out thanks to the clojure slack that my env folder is being ignored, and to create a prod-config.edn file where I have the above text in that file. I tried pushing to Heroku again and I still get the same errors as in the images on the web app, and I still get the same error message when I run heroku run lein run migrate that the config file is not being found.
What should I do?
Ok everyone this is what finally fixed it. I found this in this github post: https://github.com/luminus-framework/luminus/issues/231
it seems that
heroku run lein run migrate
from the documentation is not going to work.
Migration could be done running the generated jar file:
heroku run java -cp target/uberjar/<app name>.jar clojure.main -m guestbook.core migrate
Leaving this here in case anyone else has the same issue.

WOPI Validator Application Not Working. It returns 404 Not Found

I am trying to integrate with WOPI online through the Office Cloud Storage Program Partner Program
To do that integration, you have to use the validation application URL by using .wopitest file. It was working fine before but today it gives me 404 Not Found
My Testing URL: https://ffc-onenote.officeapps.live.com/hosting/WopiTestFrame.aspx?ui=en-US&rs=en-US&dchat=1&hid=951a6eb2-6cd8-4c6d-9258-95f2d420b241&sc=746e9e3b-8a2e-4bc1-810c-01ce605911d1&wopisrc=https://<-myRestAPIURL->/wopi/files/1051&IsLicensedUser=edit&testcategory=All
Is there anyone having the same issue or it is an implementation issue?
Note: for word documents, it is working but I need to run the full test for other issues
It still not working but you can run the validation locally. Here are the steps on windows:
Make sure you have at least.net core 2.2.1
Download the validator project from github https://github.com/Microsoft/wopi-validator-core
Rebuild the project and open the command line
Navigate to the bin folder netcoreapp2.0 folder
Run the command dotnet run --project
./src/WopiValidator/WopiValidator.csproj --framework netcoreapp2.0
-- -t MyAccessToken -l 0 -w http://localhost:5000/wopi/files/1 -e OfficeOnline -s
Note:
Provide a valid access token and your WOPI REST end point URL
Maybe you will need to disable the Proofkeys validation on your end point to make it run
All steps mentioned on the project home page at github

Lighthouse dev tools - site with authentication

I'm trying to perform audit using Lighthouse DevTools.
My site requires authentication.
When I run the test the lighthouse logs me out and only anayses /login.
How can I get Lighthouse DevTools to analyse my site? Can I supply login credentials?
If you are using local storage in order to preserve an authenticated state after refresh
(for example storing a user's token, and on refresh using that token in order to login like a lot of SPA's)
I found a solution that might work :
https://github.com/GoogleChrome/lighthouse/issues/1418#issuecomment-397753583
If using chrome dev tools to run light house :
On the lighthouse tab in chrome dev tools simply click the settings icon
Uncheck the clear storage check box.
Generate the report, and on refresh it will use the local storage data therefore will keep you logged in.
If using the lighthouse cli tool :
Install and execute as explained in JoostS answer, just add to the lighthouse command the --disable-storage-reset flag , and you can also add the --view flag in order to open a tab for the report.
So the command will be :
lighthouse <url> --port <port_chrome_debugger_opened> --disable-storage-reset --view
Verifying it tested the logged in page
You can verify it tested the logged in page by looking at the report under the performance metrics there are images of the page that was loaded, so if the images correspond to the logged in page I believe it means it was tested correctly.
See Testing on a site with authentication in the official readme:
When installed globally via npm i -g lighthouse or yarn global add lighthouse, chrome-debug is added to your PATH. This binary launches a standalone Chrome instance with an open debugging port.
Run chrome-debug. This will log the debugging port of your Chrome instance
Navigate to your site and log in.
In a separate terminal tab, run lighthouse [siteurl] --port port-number using the port number from chrome-debug.
I had to install node 10.16.3 first (node.js > 10.0.0).
nvm install 10.16.3
will show error
Could not download npm for node v10.16.3.
Download npm version what you want - https://github.com/npm/cli/releases
I had downloaded 6.9.0 npm version - https://github.com/npm/cli/archive/v6.9.0.zip
It should be extracted to C:\Users\xxx\AppData\Roaming\nvm\v10.16.3\node_modules\npm
then go to C:\Users\xxx\AppData\Roaming\nvm\v10.16.3\node_modules\npm\bin and copy two npm files. first (npm .cmd file), second (npm file)
then paste both files in C:\Users\xxx\AppData\Roaming\nvm\v10.16.3
open cmd and run command node -v and npm -v
After that lighthouse CLI works as expected.
The command still does not work though. :/
I have followed the advice of JoostS - Testing a site with authentication
The technique does not work. It opens up an new, not logged in window, and behaves just like you would expect without the --port argument.

deployment vue.js and webpack

I want in my Project to use vue.js Admin panel
so i choose this
https://github.com/misterGF/CoPilot
when i run project throw cmd > npm run dev
its work perfect throw : localhost:8080
But i need to upload the admin panel to hosting server (live)
so before i upload it
i run > npm run build
and upload it
but its not work correct when i open mydomain.com
its give me blank page
even in local if i try to open project like :
http://localhost/CoPilot
assume i put admin panel code in wamp/www/CoPilot
its also give me blank page
do i forget any step ?
why its only run throw localhost:8080
thank you
In file config/index.js, change the port.

Funcunit's open is causing trouble in online CI services such as Travis and CircleCI

I have a donejs plugin (https://github.com/riescorp/donejs-typeahead) and I decided to use funcunit (http://funcunit.com/) to do the GUI interaction tests. Everything works fine on my computer, either running the test page (http://localhost:8080/test/test.html) or running npm test on the console.
The problem is that when running tests on CircleCI or Travis CI the tests won't pass. The error is something like "xxxxx page not loaded in time!" (see example below).
There is a simplified branch to show what's going on (https://github.com/riescorp/donejs-typeahead/tree/testing-open), you can clone it, then run npm install and npm test and you'll see that it works.
You can check the details of the error in CircleCI here:
https://circleci.com/gh/riescorp/donejs-typeahead/tree/testing-open
https://circleci.com/gh/riescorp/donejs-typeahead/74 (sample)
Travis generates the same error but it will fail as I'm testing both firefox and chrome (chrome not supported in travis)
Example error:
1) QUnit "test/test.html" on Chrome 53.0.2785 / Linux 0.0.0: donejs-typeahead GUI Interaction DEBUG TESTS DEBUG 1 Page //../src/donejs-typeahead.html not loaded in time!:
Error: Expected true but was false
at Object.ok (http://localhost:3996/node_modules/steal-qunit/node_modules/qunitjs/qunit/qunit.js:2194:12)
at Object.assertOK (http://localhost:3996/node_modules/funcunit/browser/adapters/qunit.js:12:10)
at http://localhost:3996/node_modules/funcunit/browser/queue.js:168:27
You can have Funcunit open new windows in an iframe by setting frameMode: true. This is what the DoneJS app generator sets up.