Code Monkey home page Code Monkey logo

Comments (26)

github-actions avatar github-actions commented on June 11, 2024

Welcome! ๐Ÿ‘‹

Thank you for posting this issue. ๐Ÿ™‡๐Ÿผโ€โ™‚๏ธ We will come back to you latest within the next 48h (working days). Stay tuned!

from ecars.

enthuk avatar enthuk commented on June 11, 2024

Have the identical issue when following the instructions on Windows. Users on Mac OS are unaffected. Looked at the script and happening here:

log('*** Pushing source to scratch org');
execFileSync('sfdx', ['force:source:push'], { stdio: 'inherit' });

Tried executing the command manually using sfdx force:source:push -u ecars but then got a "Error force-app\main\default\flexipages\Case_Record_Page_with_right_sidebar.flexipage-meta.xml We couldn't retrieve the design time component information for component c:liveData." so blocked on this.

Tried both Powershell and Terminal and no difference. Also followed instructions from other forums on updating Path but no change. @pozil @crcastle

from ecars.

msrivastav13 avatar msrivastav13 commented on June 11, 2024

@V1JAYENDRA @enthuk What version of Node.js are you on the windows machine? Please make sure you use the latest Node.js supported version.

Let us know if it still throwing the issue.

from ecars.

V1JAYENDRA avatar V1JAYENDRA commented on June 11, 2024

Thanks for your input - i had version v14.15.1 and i upgraded to v15.3.0 and still no luck - i am seeing the same issue . Please advice.
VSCodeERROR_2020-12-09_10-46-53

from ecars.

richclark808 avatar richclark808 commented on June 11, 2024

Node version 14.15.0 which is the LTS, will try 15.4.0 and restart the machine. Using 12.19 on my Macbook and that's happy

from ecars.

richclark808 avatar richclark808 commented on June 11, 2024

Same issue after upgrading and restarting but not surprised, the error is still at the "execFileSync('sfdx', ['force:source:push'], { stdio: 'inherit' });" stage

from ecars.

enthuk avatar enthuk commented on June 11, 2024

The script is failing because the push fails, the push fails because there's an issue with the liveData.js file that gets updated by the script. This causes the Case record flexipage to fail. Removing this page from the app and source deployment lets the rest of the script continue.

Having updated node version I did note that there is now an extra warning:
(node:3740) Warning: force-app/main/default/lwc/liveData*

from ecars.

enthuk avatar enthuk commented on June 11, 2024

Looking into liveData.js I see the @track lines at the top are flagged as errors:

Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.

Checked the tsconfig.json in apps/ecars-services and the setting is there :(

from ecars.

richclark808 avatar richclark808 commented on June 11, 2024

Update on this from last week. Found liveData* listed in the .forceignore, odd. Don't understand why deploy script works on Mac but if you remove this entry from .forceignore and use the manual deployment instructions it works on Windows. Odd.

from ecars.

msrivastav13 avatar msrivastav13 commented on June 11, 2024

@rclark-provar @enthuk @V1JAYENDRA We will look into it! Thanks for letting us know!

from ecars.

github-actions avatar github-actions commented on June 11, 2024

Flagging this as stale, as there was no recent activity within the last 14 days. ๐Ÿง

from ecars.

dotdriver avatar dotdriver commented on June 11, 2024

I get the same error as @V1JAYENDRA (Dec 8th comment) while installing on Windows 10 Pro with all the latest updates.

My setup is as follows:
node is v15.14.0
sdfx is sfdx-cli/7.96.0 win32-x64 node-v15.14.0
heroku is heroku/7.52.0 win32-x64 node-v12.21.0 (why is node listed here as v12.21.0? )

I'll explore suggestions by @enthuk

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

I am getting same error as others, if I find workaround will post back...

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

I was able to remove the errors by going to settings, searching for Experimental Decorators, and toggling it on as shown here:

image

Still getting an error on this line of ecarsDeploy.js

execFileSync('sfdx', ['force:source:push'], { stdio: 'inherit' });

but if I just run sfdx: force:source:push in the console it works fine (e.g. Scratch Order objects are set up properly). I am not yet sure what stdio: 'inherit' does as a sync option, but I am going to test some more things and will see if I can get it to work. Will let you know what I find.

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

To provide an update, I was able to get further in the automated deployment script to run by changing ecarsDeploy.js line 216 to this:

    // Use execFileSync because shelljs does not handle either the  progress
    // bar or errors correctly running this command.
    log('*** Pushing source to scratch org');
    //execFileSync('sfdx', ['force:source:push'], { stdio: 'inherit' });
    sh.exec('sfdx force:source:push'); // EMS CHANGE

Changed this line:

execFileSync('sfdx', ['force:source:push'], { stdio: 'inherit' });

To this line:

sh.exec('sfdx force:source:push');

That worked fine for creating the scratch org.

I am having access rights issue with Heroku (e.g. Host key verification failed, could not read from remote repository) but that might be on my end to correct yet. If I have to change any code to get it to function will post it back here on this Issue.

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

Another update from me on this one, in order to get the Host key verification failed issue to resolve itself, I manually ran this command in terminal:

git push [email protected]:HEROKU_MQTT_APP_NAME.git

replace HEROKU_MQTT_APP_NAME with whatever name you have in the environment. By doing it this way, it asked me the following:

The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
RSA key fingerprint is SHA256:blah.
Are you sure you want to continue connecting (yes/no/[fingerprint])?yes
Warning: Permanently added 'heroku.com,50.19.85.156' (RSA) to the list of known hosts.

So, I believe I had to get past git confirming I wanted to accept the fingerprint. Possibly I missed that step in setting things up, not sure. Or, it is something you would have been already asked in the past if it wasn't the first time integrating with Heroku. Mentioning it here in hopes it helps someone else.

I have run into one more "error" from lines 354

    log('*** Provisioning Database');
    sh.exec(
        `heroku run 'cd packages/ecars-db && npx sequelize db:migrate' -a ${sh.env.HEROKU_REALTIME_APP_NAME}`,
        { silent: true }
    );

It threw this error:

exec:  ยป   Error: Missing required flag:
 ยป     -a, --app APP  parent app used by review apps
 ยป   See more help with --help

If I run the command directly it worked out fine:

heroku run 'cd packages/ecars-db && npx sequelize db:migrate' -a ecars-rt-random-name-78

So I am not yet sure why it didn't provision the database in the script, will let you know what I find.

from ecars.

julianduque avatar julianduque commented on June 11, 2024

@jeffolmstead Thanks for this exhausting report, I'll go ahead and try the deploy script with the latest version of SFDX and push the proper fixes.

A couple of questions:

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

@julianduque hope the comments are useful! I don't want to bog things down, but I know I find them useful if I have a similar problem and someone has detailed out the steps they took to get past it.

Here is a response to your request:
OS is: Windows 10
Heroku is: heroku/7.52.0 win32-x64 node-v12.21.0
sdfc is: sfdx-cli/7.98.0 win32-x64 node-v15.14.0
I did add SSH keys but later, I think that took care of one of my issues

One other issue I had was in generating the PDF in the ecars-services app. The script for "copy-files" wasn't copying over any folder / file that had a space in it on Heroku (worked fine locally). I ended up switching to 'ncp' package (instead of 'copyfiles' package) and now have this in my package.json (under scripts):

        "copy-images": "ncp routes/pdf/images dist/routes/pdf/images",
        "copy-fonts": "ncp routes/pdf/fonts dist/routes/pdf/fonts",
        "copy-files": "npm run copy-images && npm run copy-fonts",

And of course this in my package.json (under dependencies):

        "ncp": "^2.0.0",

This worked out good on Heroku and I was able to generate a PDF after redeploying.

Currently, the PWA app works perfectly locally. When I click "Contact Me" it generates the Lead in Salesforce and brings in the car configuration. It also works with Push Notifications. However, on Heroku, when I click "Contact Me" I get this error thrown:

image

I am still debugging that one.

Thanks for putting together this example, it shows a lot of great integrations.

from ecars.

julianduque avatar julianduque commented on June 11, 2024

@jeffolmstead Indeed, all of this information is super helpful for us! Thank you very much!

For that last error, it would be useful to see if there is any output on the JavaScript developer console on your browser, also, to know what browser are you using in this case.

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

@julianduque so I just jumped over to Chrome to try it out and... it worked perfectly.

Chrome: Version 90.0.4430.93 (Official Build) (64-bit)

I have been doing my actual work in Brave (which is based on Chrome) and here are those details:

Brave: Version 1.23.73 Chromium: 90.0.4430.85 (Official Build) (64-bit)

The Console log in Brave shows this:

Service Worker and Push is supported
app.js?WB_REVISION=45917dfb0f353a22dfaf20480dde5659:1 Service Worker is registered ServiceWorkerRegistration
app.js?WB_REVISION=45917dfb0f353a22dfaf20480dde5659:1 ServiceWorkerRegistration
app.js?WB_REVISION=45917dfb0f353a22dfaf20480dde5659:1 Subscribed: false
app.js?WB_REVISION=45917dfb0f353a22dfaf20480dde5659:1 Service worker active
app.js?WB_REVISION=45917dfb0f353a22dfaf20480dde5659:1 BKEoox-Ctic9c0_W5VtMasn8JaeGAcx51W9O9tHj_-2c02lDwI7jvHQN6UHFgvl2XiPf_6VVCRsSmqDDnRr0gdQ

Then for the next section a picture might be better:
image

It also works fine in Edge, might just be something with my Brave browser... overall, tremendous progress!

from ecars.

julianduque avatar julianduque commented on June 11, 2024

@jeffolmstead Thank you very much! This is super useful for us.

Yes, Brave might be a bit jealous and should be blocking something around WebPush Notifications, need to give it a try.

Also, thanks for recommending ncp, I'm going to see if I can reproduce the issues you mentioned with folders with a space in their name.

Last question from me.

What shell are you using on Windows 10? It is WSL/WSL2? Are you doing it directly on Powershell or cmd.exe? Or any other like git bash?

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

I did get the same error to throw on Chrome now. When I 'Unsubscribe' it says it is successful, then when I try to 'Subscribe' again it fails with that same error. When I do a browser refresh it still shows as subscribed. So I am wondering if the 'Unsubscribe' process isn't quite working right.

I am doing everything through Visual Studio Code and running in Node.js. I don't believe it is using a Windows Subsystem but perhaps Visual Studio Code is obfuscating that on me. I am running all commands via PowerShell (inside Visual Studio Code). And yes, to explore Heroku files (which is how I located the images missing that had spaces) I use Bash via this command

heroku run bash -a {appname}
$ cd dist/routes/pdf/images/PDF
$ dir

And in there I could see that images were missing. Oh, one more note, to make errors easier to surface in Heroku, I added this line in 'ecars-services/routes/pdf/index.ts' on line 50

this.log.error(err); // Log errors to console so I can see in Heroku

The next line uses this:

request.log.warn(err.message);

but there is nothing on "err.message", just "err" so it didn't prove to be helpful.

from ecars.

jeffolmstead avatar jeffolmstead commented on June 11, 2024

@julianduque do you think we could align some of the lightning components with the SLDS grid so it works in mobile? Currently it doesn't work on small screens. However, if you add this markup:

image

(note the class names) AND you remove the "overflow: hidden;" on the body tag

image

Then it looks excellent (I am biased I know) in mobile:
image

By the way, thanks for the help, I am going to try and work through the other trailheadapps provided.

from ecars.

julianduque avatar julianduque commented on June 11, 2024

@jeffolmstead Yes, that it's totally doable and a great suggestion, if you want to open PR, feel free to do it. If not, we can take care after researching the issues you have been experimenting with Windows.

I just tried the full deployment process in MacOS and it works good, so I guess there might be some slight incompatibilities on Windows.

from ecars.

github-actions avatar github-actions commented on June 11, 2024

Flagging this as stale, as there was no recent activity within the last 14 days. ๐Ÿง

from ecars.

julianduque avatar julianduque commented on June 11, 2024

@jeffolmstead @V1JAYENDRA Thanks again for reporting this issue. Automated deployment has been fixed on Windows both on cmd.exe and PowerShell.

@jeffolmstead The other suggestions made in this comment are going to be addressed too. Thank you again for your exhaustive report and suggestions!

from ecars.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.