Can not find my project settings in Sublime/Mavensmate - salesforce

I am using MavensMate Build 3124, which requires a separate MevensMate app in combination with Salesforce. I can now no longer find my project settings, meaning I can not refresh from my Salesforce server using API 38.0. This keeps resetting my package.xml to v37.0. I have set my Global Settings to use API v38.
Where can I find my project settings so that I can refesh using API 38?

look for the following file in your repository:
[your-project-name].sublime-project
add the following
{
"mm_api_version" : 38.0
}

Related

Nextjs 404 error on reload/ refresh action

I'm using Nextjs for a front-end application and dotnet core 3.1 for the Web API. There are some pages that are static and other that are dynamic I followed the official documentation to achieve this. On development mode (local machine) everything works fine. Both static and dynamic routes are working properly and fetching data from the dontnet core Web API.
However, when publishing the Nextjs app following this steps:
yarn build
yarn export
An out folder is generated at the root of the project
The content of that folder is uploaded to the server
After, the deployed files are uploaded and when loging to the app, it redirects to the main page (until here is working OK), but as soon as I click on the reload page botton (Chrome) I am gettint the 404 error.
Looking at the console in the developer tools I got this:
I found this Stackoverflow link with same issue but there the answer is to use Express for server routing. In my case I am using dotnet core Web API for server requests. So, not sure how to do that.
Is there a way to fix this from the client side? Might be a configuration is missing?
The only thing I noticed while doing the export was a message saying: No "exportPathMap" found. Not sure if that would the the reason.
I had got similar issue in react when all of my pages after building and exporting had ".html" extensions. I solved it by the following code in next.config.js file.
next.config.js
module.exports = {
exportTrailingSlash: true,
}
Note: Do not work with the above code while in development. Use it just before building the project.
You can find the documentation link here: https://nextjs.org/docs/api-reference/next.config.js/exportPathMap#adding-a-trailing-slash.
UPDATE
The above code was for next.js v9.3.4 which I was using at that time. For newer versions below code should be used according to docs.
next.config.js
module.exports = {
trailingSlash: true,
}
it has been fixed update your nextjs package
npm install next#latest
based on the current version of Next js you have, visit here to see if there's any breaking change before updating what you have
I had a similar issue where after deploying the out folder created by next export all URL's would redirect me to the homepage. Everything was working fine during development and all URL's were accessible with next/link but in order to access pages with a URL I had to add a .html extension at the end of the URL.
Because I needed a quick workaround I added a useEffect block in the _app.tsx file for rerouting so that upon landing on the homepage it would act as if a Link component was clicked redirecting to the entered URL.
useEffect(()=>{
router.push(window.location.href)
},[])

Cannot find the component id : gs://

Component id when added to the data studio was working fine but suddenly stopped working .
The project has public access in google cloud platform.
Not sure what else is missing ..
The “cannot find the component ID” error can come from a couple different things, the most common being:
The manifest, JavaScript, and config are not all public-read
There’s a GCP billing error
The manifest or config are not valid JSON
The manifest or config are not in the format expected by Data Studio. (See the manifest reference and the config reference to see what Data Studio expects)

Error while deploying react based SSR app, using firebase-functions

I am trying to deploy my SSR app in Firebase originally forked from, after doing some modification in the app.
Which works fine when I do sudo firebase serve --only functions,hosting but throwing error when I do firebase deploy.
The reproducible repo has a package.json.
I am using the public directory as my function directory as well.
However, even if I am using a different function directory for my cloud functions, I see the same errors.
Function failed on loading user code. Error message:
Code in file index.js can't be loaded. Is there a syntax error in your code?
Detailed stack trace: TypeError: c(...) is not a function
at Object.<anonymous> (/user_code/assets/app.server.js:1:28950)
at Object.module.exports.n (/user_code/assets/app.server.js:1:29283)
...
Functions deploy had errors.
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
It is possible, but you cannot serve static assets with cloud functions. You need a mix of firebase functions and firebase hosting.
The guys at Firebase already thought on this and you also have an implementation available.
Check the following documentation:
Overview
Dynamic Content
Code Example
Youtube Video
Note: There is a delay that you need to take into consideration when using cloud functions.
When a new instance handles its first request, the response time suffers, which is called a cold start
More info
The problem is that firebase hosting only supports SPAs, which means that SSR is out of the picture, you need to run your SSR server in a different env where you can run nextJS, or if you're using a static page generator you could upload the files directly compromising on the ability to refresh the content, although, I'm sure a solution with cloud functions and gatsby is feasable.
Tl;DR: You won't get SSR out of Firebase Hosting

Load resource file in Google Cloud Endpoints

I'm using Google Cloud Endpoints as back end of a mobile application.
Now i want to implement push notifications for the iOS client but can't load the .p12 certificate from an #ApiMethod, get this error message:
Invalid keystore reference. File does not exist:
/base/data/home/apps/s~my-ws/1.379168523188882449/MyCert.p12"
I added the certificate under /src directory but does not seem to recognize it.
I'm using IntelliJ IDEA, Appengine API 1.9.12, javapns (for Push Notifications) and Maven.
Edit
Maybe i made a step forward.
I put the .p12 file under /src/webapp/WEB-INF/ and added
<configuration>...<webResources><resource><includes><include>*.p12</include>
in my pom.xml.
Then i run mvn clean install && mvn appengine:endpoints_get_discovery_doc and inspected the generated myws-1.0-SNAPSHOT.war. Within the .war file there is my MyCert.p12certificate, but i get this error message now:
java.security.AccessControlException: access denied (\"java.io.FilePermission\" \"/WEB-INF/MyCert.p12\" \"read\")"
Could you check the code that is actually loading the cert? It may be that you need to remove a leading slash from the File constructor. This is not an App Engine thing but a java File thing.
Also, unrelated to your solution but helpful, is a thread here on best ways to store p12 files on App Engine.

IntelliJ: Automatically update resources

I am using IntelliJ IDEA to develop AngularJS app with Java back-end. HTML/JS is server from Tomcat.
Whenever I changed HTML/JS file, I hit CMD+F10 and select Update resources, then refresh my browser and everything is OK.
I'd like to ask if there is a way that IntelliJ would do this automatically for me. I know that I can check 'Don't ask again', but sometimes I really want to Redeploy or Restart server as well ...
If you go into your Server Run Configuration, on the Server tab there is an option named "On frame deactivation". Set that to "Update resources" and then whenever IDEA loses focus, it will update the resources of the server.
Relevant docs from Intellij http://www.jetbrains.com/idea/webhelp10.5/updating-a-running-java-ee-application.html#update_on_frame_deactivation
Edit 8/19/2020
Thanks to Adi Gerber for providing an updated link, which is https://www.jetbrains.com/help/idea/2016.2/updating-applications-on-application-servers.html#update (the previous one doesn't work anymore)
And here is a link to the current docs as of 8/19/2020: https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html#update
Another TRUE AUTOMATED APPROACH that works very well is :
Having an imported Maven project
Option: Build Tools > Maven > Importing > Import Maven Project Automatically to keep in sync IDE compiler options specified in POM ( for example maven-compiler-plugin options)
Plugin: File Watcher to watch for resources' updates
Option: Tools > File Watcher > Custom watches to copy updated files via mvn war:exploded ( in our case Javascript and HTML )
Option: Build > Compiler Build Project Automatically to update .class
In our case we deploy on Google Cloud App Engine Devserver which reloads files everytime they are updated

Resources