ChunkLoadError after deployment to Production ( Vapor + AWS ) [Laravel & Vuejs] - laravel

I have developed a small appointment system using Laravel and Vue.js. For deployment purpose, this system has been deployed using Vapor(https://vapor.laravel.com/) and AWS. While the deployment has been successful i.e I can see the login page, login successfully and even perform some functions. However most of the navigation links are not working. The errors that I see in browser console : ChunkLoadError: Loading chunk XY failed at path https://hosturl/js/[file].js
Before deployment when I execute npm run production, I can see that files are being generated in root/public/js. But after deployment the system seems to be unable to find/access them. All the routing has been handled using vue router in the development.
Is this issue somehow related to webpack.mix.js or is the expected folder structure different after being deployed? Am I missing something important here that is needed for production? I am new to Vapor and AWS so help will be really appreciated.

Related

Heroku not applying environment variable changes in Okta OAuth 2.0 PKCE VueJs app

I' trying to execute the OAuth 2.0 PKCE demo with a VueJs app outlined here:
https://developer.okta.com/blog/2019/08/22/okta-authjs-pkce
https://github.com/oktadeveloper/okta-auth-js-pkce-example
Once in the Heroku App I have these Environment Variables:
Everything appears to be running fine except for the fact that the variables OKTA_CLIENT_ORGURL and OKTA_OAUTH2_ISSUER were refering to an incorrect dev-XXXXXX address, the correct one is the one shown on the picture (dev-371167), before it was someone else's url (dev-739491) for some reason.
The problem is that after making the changes shown in the image to the correct dev url, it's still making the calls to the old dev-739491 url.
Heroku doesn't seem to be refreshing or making the desired changes in the app.
Am I missing an option to refresh? Is it possible to rebuild so it reads the new changes? Could the problem be in the code/build itself?
Thanks.
EDIT: As per the suggestion in the comment I turned the app off then on again and it still didn't make the changes.
This is what my screen looks like:
EDIT 2: I have since deployed the same app two more times and reading the build logs it assigns a random CLIENT_ID and URls. Each deployed app has a different pair of these. I don't know where they come from.
I wrote the Okta Heroku Add-On. I'm looking into the behavior you're seeing.
When you change the environment variables, heroku should restart your app automatically.
So, the two issues are that the environment variables didn't match you saw in Heroku didn't match with what you expected them to be and that the app doesn't seem to be picking up on the environment variables.
How did you know that dev-371167 was the correct org and that dev-739491 was incorrect?
When you say you deployed the app two more times, what exactly are you doing to deploy? Are you using the Heroku cli?

How do I fix an Invalid Host Header error when deploying my react app to Heroku?

I'm having difficulty deploying my react app to Heroku. It runs locally just fine.
I keep getting the error Invalid Host Header when I go to the page: remiix.herokuapp.com
My repo is: https://github.com/hopeatina/remiix
I've tried using just proxy in package.json: "localhost:3001/"
I've tried using concurrently, as described here
I don't know what else to do and would like any enlightenment as to what I'm doing wrong.

intervention-image with laravel 5.2 on ubuntu-server breaks the other calls

I am using laravel 5.2 to write services for a mobile app. all the calls are working fine. My project is deployed in ubuntu server.
Now I want to resize the uploaded images inorder to maintain same performance. I thought of trying intervention-image.
In local machine it worked fine. I installed intervention-image and set the provider and alias name, I included the alias name to controller. Once I do that and update the server, all the other calls are getting effected. I am getting 505 error.
It's the intervension-image which is causing this problem, I checked with previous upload and I am getting all the calls. Any suggestions?
I suggest you create a dev environment like your production , use vagrant . About error 505 check you error log file to have more detail about the bug

Deploy WSO2 Enterprise App Store in EC2 using ELB

I am deploying the WSO2 Enterprise App Store into EC2 behind an elastic load balancer (ELB) and having some trouble getting things configured properly.
I have configured $INSTALL_PATH/repository/conf/carbon.xml with the proper HostName and MgtHostName of the ELB DNS name and I can get to the front-end of the app store and to the admin console.
I am unable to:
get user registrations working throuth the front end app store
get to the back-office console
The issue appears to be in routing requests to the identity service. I get an error like the following:
You are now being redirected to Identity Server. If the redirection fails, please click on the button below.
I then get a timeout on the redirect to this RFC1918, non-routed, address:
https://10.x.x.x:9443/adminsamlsso
I see no errors in the logs on startup or throughout execution of the application.
How can I configure this application such that all requests are re-routed through the AWS ELB (not the WSO2 load balancer) and not through the direct, local, IP address?
Please modify following configurations as well,
Update the AssertionConsumerService property for all apps(store, publisher, social) within /repository/conf/sso-idp-config.xml
You can find few jaggery apps within /repository/deployment/server/jaggeryapps/ directory. Each app has its own json config file within config directory.
Eg :- for store app /repository/deployment/server/jaggeryapps/store/config/store.json
You have to update the identityProviderURL property within ssoConfiguration in those apps as well.(store, publisher and social)
If you are using ES-1.0.0 It's better if you can move to the latest 1.2.0 M2.
We also faced similar issue and now fixed in the master branch.
If you need to continue with the same 1.0.0 you can get rid of this issue by updating,
<ES_HOME>/repository/deployment/server/jaggeryapps/store/controllers/login.jag, <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/controllers/login.jag
<ES_HOME>/repository/deployment/server/jaggeryapps/store/controllers/logout.jag, <ES_HOME>/repository/deployment/server/jaggeryapps/publisher/controllers/logout.jag
You have to update the postUrl in above four files correctly.
NOW : postUrl = "https://" + process.getProperty('carbon.local.ip') + ":" + process.getProperty('https.port');
It should be something like https://localhost:9443/
At the end post URL should be something like https://localhost:9443/admin/samlsso
<form method="post" action="<%=postUrl%>/admin/samlsso">

Getting a 404 using App Harbor and BitBucket

I'm new to AppHarbour and I'm trying to deploy my MVC app on a free account.
I keep getting a 404 error.
The app is coming from Bit-bucket and it was deployed successfully.
In my Hostnames section i see the following
so i have added the following to the Hosts file in my machine:
176.34.122.158 camelotfaultmanagement.apphb.com
but i still get a 404 ..
What am i doing wrong ?
And a follow-up question how can i edit one of the files to be able to edit the connection ?string to my DB?
It looks like you may not have any successful builds yet - You have to push to Bitbucket to trigger your first build. You can see a list of builds on the app dashboard: https://appharbor.com/applications/camelotfaultmanagement
To use the built-in .apphb.com domain, you don't have to mess with any DNS setup.

Resources