Magento 2 Advanced Reports 404 page - api

How to fix 404 page in Magento 2.2 - 2.3.4 versions Advanced reports?
If you see the status pending in the configurations, the enter code hereuser for advanced reports is absent.

First of all create manually a new Reports user, open :
System->Extensions->Integrations
Check is a user with the name "Magento Analytics user" is there. If not please do the next steps:
press New Integration button
paste the name - "New Integration", into the name input.
in the field "Your Password" type the current admin password
at the left tab, press the "API" tab.
In the "Resource Access" dropdown, select the "All" option, and in the next step press "continue" (do not change any keys, tokens,etc.)
Press save.
Clean/flush caches.
Now you can check your current integration status in the :
Stores->Configurations->General->Advanced reports.
If the Status is enabled -> everything is fine (check it in 5-10 mins). If it is pending, go to prev. step and press in the grid "reauthorize" and check again your current status.
And now you should wait for 24 hrs for a report generation. But here we have a small lifehack, just follow these steps:
Go to the Magento root dir via ssh or terminal:
Download the latest stable N98-Magerun phar-file from the file-server:
wget https://files.magerun.net/n98-magerun2.phar
add "run" permissions:
chmod +x ./n98-magerun2.phar
and after that just simply run:
./n98-magerun2.phar sys:cron:run analytics_collect_data
After these last steps, please wait ~10-15 mins and press "Go to advanced reports" button at the right top corner in the Magento dashboard.
If it was helpful, please vote up! With love from Ukraine <3

Related

'npm' is not recognized as internal or external command, in windows 11

when I'm typing commands which starts with npm, it shows the massage of ,
"'npm' is not recognized as internal or external command"
Download node.js
First of all Download and install node.js from here Nodejs.org
In windows 11
There are two ways to do this
the short way is,
1. Go to settings
2. Now you are on System window, click About
3. Next, Click on Advanced system settings button
4. Then, Click Environment Variable on the dialogue box
5. From Environment Variable, Select Path6. And then click Edit
7. click New
8. At the text box, add ; C:\Program Files\node.js\
9. Click Ok all the open dialogue box
Reference: Fix ~ npm not recognized as internal or external command (Note: this is my own blog[include images also)

TFS Selenium XPaths

Hello I am trying to set up a selenium IDE script that clicks on each repository in the admin area and edits some permissions.
I can have it simply click on the ID of the repo but the issue I have with that is the ID assigns a number to the repo which while it works it is not great as that every time I add a new repo to our TFS I'll have to fix all the repo IDs since they'll be off by 1. I am trying to have Selenium click on a repo by it's title or it's link I had some progress with using:
click link=My.Repo.TFS
The issue with that is when it executes the command it kind of clicks on the link. Normally when a a link is clicked in the admin area of TFS it will expand the repo and show the branches for the repo, but with the command I have now it simply highlights the linked link but does not expand it.
This is what the command does
This is what it should do
Edit: As requested here are some screenshots to better show what I mean.
You can do it like this:
ChromeDriver cd = new ChromeDriver();
cd.Navigate().GoToUrl("https://xxxxxx.visualstudio.com/GitPullRequest/_admin/_versioncontrol");
cd.FindElementByXPath("//div[text() = 'aaa']").Click();
And then you will get a result as below:

How to prevent Gradle job running in background on TFS agent

I have configured a Windows 7 VM as an agent to my TFS2015 setup.
I have created a Gradle (invoking the gradlew.bat) job to run my selenium scripts from the TFS build definition as
gradlew.bat clean test aggregate
This works fine (I can see IE being invoked) when I run it MANUALLY from the VM directly, BUT when the same is triggered as a job, it runs only in the background. Here are my observations:
The processes - Java, iexplorer, IEDriver.exe are all getting invoked in the Process manager.
When I kill iexplorer process, I can see the UnreachableBrowserException on the TFS console and the next test case runs.
The job with 2 test cases (approx 3-4 mins) fail after running for 10 mins and I see the error logs in TFS console
The scripts ran on UI the very first time I set this up but has never run after that.
I am using Gradle 3.0 and have disabled the Gradle Daemon by adding org.gradle.daemon=false in gradle.properties. This has been bugging me for a couple of days so badly.
Any help would be great.
For your tests to interact with the desktop they will need to be running interactively on a machine that is logged on and not locked (no screensaver active).
See: https://www.visualstudio.com/en-us/docs/build/admin/agents/v2-windows#interactive
You can configure the machine to start-up automatically and authenticate on start-up, disable the scren locking policy and screensavers and add the run.cmd to the windows start-up section in the star-menu.
See: http://donovanbrown.com/post/2015/08/28/auto-start-build-agent-in-interactive-mode
Press Windows Key + R to open the Run dialog
Type in the following and press enter:
control userpasswords2
Uncheck the box for User must enter a user name and password to use this computer.
Click the Apply button
You will be prompted by an Automatically sign in dialog
Enter the password for the user
Click OK
Click OK on the Users Accounts dialog
And
Right-click the desktop
Select New / Shortcut
Enter cmd
Click Next
Change the name to Start Agent
Click Finish
Right-click on the new shortcut
Select Properties
Append /c {pathTo\run.cmd} to the target
If you installed your agent to C:\Agent, your target should look like this: C:\Windows\System32\cmd.exe /c c:\agent\agent\run.cmd
Click OK
Note: updated for the 2.0 build agent, which is started using run.cmd instead of vsoagent.exe
Press Windows Key + R to open the Run dialog
Type in the following
shell:startup
Click OK
This will open the Startup folder in Windows Explorer.
Drag and drop the shortcut to this folder

PDFCreator installation crash

I am currently trying to install PDFCreator 1.6.2 on my computer (Windows 7 64bits).
I have to use this specific version and not another one due to compatibility issues with another program.
I launch the setup in administrator mode, check "Expert settings"
I accept the agreements
I choose the Server Installation
I Click on "next", let the default printer's name "PDFCreator"
I do not check the box "Windows 2000/XP/2003 - 32bit" and click next
I choose the directory in which I want to install it (C:...\PDFCreator)
I just uncheck "PDFArchitect" and let everything else by default
I let the program's shortcut name in the start ùmenu folder by default (PDFCreator)
At the next page I also let everything by default (create a desktop icon for all users, create an entry in the Windows Explorer context menu)
Click on next, the summary of the installation is displayed, click on Install
The bar goes through the end, then "Create an entry in the Windows Explorer context menu" is displayed and a error pop-up appears which says "During the printer installation errors have occured. A detailed description can be found in the file "SetupLog.txt" in application path.
I click on "OK", and the last setup page is displayed. I uncheck all the boxes (launch PDFCreator, SetupLog.txt, show help), click finish and the setup crashes.
PDFCreator does not appear in the printers and if I try to add one manually by clicking on "add a printer", select "add a local printer", "create a new port", port type : "pdfcmon", I can click on "next" but it has no effect so I am a bit stuck.
Do you have an idea why does the installation crashes ?
Is there a workaround ?
The content of the file "SetupLog.txt" is available here :
SetupLog.txt
I've so far been unable to reproduce your problem despite numerous test installs (and uninstalls) of v1.6.2 on a Win7 64-bit box. Your posted log indicates that the process successfully created the pdfcmon port, but then apparently lost it afterwards (or else never created it, but misread its own return status):
Install printerport:
Portname : pdfcmon
Result: Success
[...]
InstallPrinter:
Printername: PDFCreator
Drivername : PDFCreator
Portname : pdfcmon
Result: Error 1796 = Le port spécifié est inconnu
It's reasonable to assume that nothing useful will occur beyond that point, so you'll need to address error 1796 first. A quick Google of that error code leads to a number of queries at PDFForge.org about it:
http://forums.pdfforge.org/search?Search=1796
Not all received replies, but one involving 2003 Server in particular did:
you need the latest service pack for Server 2003, then it should work.
Elsewhere in your log file I see references to some older software (e.g. Internet Explorer version: 9?) which leads me to think that you might want to doublecheck that all your relevant service packs and software are up to date first, then try your installation again.
Nevermind, I gave up installing PDFCreator, I have a server on which I could install it without any problem so the problem is kinda fixed
I still don't know why it crashed but that's not relevant anymore.
Sorry for making some of you wasting their time

"Git Bash here" isn't working when right clicking

I don't know, how that happened but before today I could right click on any folder and there would be and an option Git Bash here. But today I dont have that option. Anyone knows how to get that back?
HOW TO FIX WITHOUT RE-Installing:
I got this problem after moving all my programs off of my main hard drive and pasting them into my "P" drive. But kept all of the directory structures the same.
Git was moved from:
C:\DEV\PROG\GIT
TO:
P:\DEV\PROG\GIT
1: Open The Registry Editor:
Type "regedit" in start menu search and hit enter.
2: Find the context menu shortcut configuration for "git bash here"
In regedit: Menu "Edit" > "Find" > "Find what" and enter "git_shell"
3: Edit the Data value so that path points to the correct location.
In my case I changed:
"C:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
TO:
"P:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
Screen shot included below.
Steps if you can't use the reinstall metod.
Use REGEDIT
1/ Open regedit (search it if needed)
2/ Go to 'HKEY_CURRENT_USER/Software/Classes/Directory/Background'
3/ Create new key 'shell'
4/ Create new key 'Git bash here' (or whatever name you want to see in the menu)
5/ Create new key 'command' (must be named command)
At this point point you'll have
'HKEY_CURRENT_USER/Software/Directory/Background/shell/Git bash here/command'
6/ Edit the value of the command key as follow 'pathToGit/git-bash.exe'
Update or open new windows explorer and you'll see it when right clicking.
Image to sum this up :
Reinstall Git and select:
Context menu entries: "Git Bash Here" (and the "Git GUI Here" option)
During the installation. Can't say why it disappeared, but this should bring it back.
Run this script (AddGitToExplorerContextMenu.reg).
You may need to update the location of Git. You can add it
manually through regedit also
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell]
#="Git Bash"
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
#="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
Had the same issue , realized that previously right clicking anywhere or inside the folder the Option would show but now I had to select or highlight the folder and then right_click for the option to show.
Uninstall Git completely and delete the Git folder in program files.
Install Git.
From the Context menu, select "Git Bash" & "Git GUI here" options.
I found what I was looking for was in the left pane, not in the right folder. And still using the right-click.
Press SHIFT+F10. It will appear
After Windows 11 update, it got invisible. I first uninstalled the older version and installed the latest 2.35 version. it was still not visible.
It is still there albeit inside another folder in the context menu that comes with a right click.
By going inside any folder right-click INSIDE that folder, in German OS there is
Shift + F10 combination you have it there like before. Or without this shortcut combination go inside Further option (This last) it is there.
It worked fine when I was using Win 10 ,after upgrading my windows to 11 it stopped working.
I solved my problem by following these simple steps.
Uninstall Git completely on computer
Download it here : https://git-scm.com/download/win
Install it
It works fine now!!!
Once you right click on the folder , click on 'Show More Options'.
Now you should be able to see all the earlier options such as 'Git Bash Here'