- ABP Framework version: v9
- UI Type: Angular
- Database System: EF Core (PostgreSQL.)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
Hello i am having a problem when i am trying to generate a proxy for my main module. When i try to run the command
abp generate-proxy -t ng -m doohlink -u https://localhost:44389
i am getting
[API Not Available] Request to https://localhost:44389/api/abp/api-definition is unsuccessful. Please double-check the URL in the source project environment and make sure your application is up and running. but the url is available
I can send you the api-definition file if you want. I am using kestrel to debug the application. And i tried dotnet run from the root also. Any assistance would be appreciated
13 Answer(s)
-
0
Can you try the exactly same command with
abp-old
insteadabp
. Do you get the exactly same error?abp-old generate-proxy -t ng -m doohlink -u https://localhost:44389
-
0
abp-old generate-proxy -t ng -m doohlink -u https://localhost:44389
i am getting abp-old: The term 'abp-old' is not recognized as a name of a cmdlet but when i use the old cli with this command
abp generate-proxy -t ng -m doohlink -u https://localhost:44389 --old
i am getting the same error.
is there any abp-old command? i didn't see it on docs.
-
0
New information from me. I have tried the same in my macbook. And it works over there. What can be wrong for my windows pc? Do you have any idea? I am sure that firewall is not blocking. And where can i find detailed logs for cli and how can i delete all the cli and reinstall it again from scratch?
-
0
Hi,
Angular team will help yo on this topic soon.
I have tried the same in my macbook. And it works over there. What can be wrong for my windows pc? Do you have any idea?
But here is my thoughts on that:
It might be a problem related to your nodejs, yarn or npm version. ABP uses yarn v1.22 not the latest version
https://abp.io/docs/latest/get-started/pre-requirements#node-js-and-yarn
Can you confirm that? Is the installed yarn versions different on 2 computers?
-
0
I have tried the same in my macbook. And it works over there. What can be wrong for my windows pc? Do you have any idea? I am sure that firewall is not blocking.
Hello, this should not depend on the operating system itself. Can you confirm that you have used exact the same url parameter for both trials? Because, schematics cannot reach the api and it may be running on
http://localhost:44389
rather thanhttps://localhost:44389
So, as @enisn says, you should check the version compatibilities of your package manager along with the node.js version.
-
0
Hello,
windows pc: yarn version: 1.22.22 node version is v22.12.0
mac yarn version: 1.22.22 node version 22.11.0
i don't think this is related with yarn or node versions cause i have 1 main app and 2 external modules (running standalone) in my angular app. So i serve 2 external modules from port 7038 and 44361 and if i try to generate the proxies for them. It works fine also from my windows pc. I couldn't get the answer about some of my questions how should i uninstall and clean everything related with cli from my windows machine? Where can i see the detailed logs about abp cli after i run the command? Where can i get the source code of abp cli?
-
0
I'm glad to hear that it functions properly on both machines. Apart from that,
how should i uninstall and clean everything related with cli from my windows machine?
You can manage cli installation using dotnet install/uninstall command here: https://abp.io/docs/latest/cli#installation
Volo.Abp.Cli
is the old andVolo.Abp.Studio.Cli
is the new one.Where can i see the detailed logs about abp cli after i run the command?
There is no more detailed logs for this part except throwing the related error that is coming from here However, you can integrate the source code to your project and add custom Loggers.
Where can i get the source code of abp cli?
You can also reach full schematics source from here https://github.com/abpframework/abp/tree/dev/npm/ng-packs/packages/schematics
-
0
I didn't say it works for both machines. I say that for some of my microservice modules it works. But for my main app it does not. So we can eliminate the theory about the versioning cause it already works for another microservice.
And i still didn't understand how you are helping to solve the problem. i already know that i can uninstall with dotnet uninstall command. But aren't you caching anything in some folder (maybe in an .abp folder some files related with logging)? At least it is clear that you are saving log in information somewhere cause when i uninstall and reinstall it it doesn't ask me about it.
By the way the cli error clearly not giving any information about what the real error is. There is sth else in the background throwing the error. Not because it can not reach the URL.
How am i going to integrate the schematics package and how am i going to add custom loggers? And how does it work really When i install abp cli and run the command does it look at schematics package? Right now this problem is stalling my development. Please instead of giving abstract informations give me some directions so i can solve the problem.
-
0
I say that for some of my microservice modules it works. But for my main app it does not.
Thank you for providing more details. That would be the best if you can also share the api-definition request result with me through this email sumeyye.kurtulus@volosoft.com.
i already know that i can uninstall with dotnet uninstall command. But aren't you caching anything in some folder (maybe in an .abp folder some files related with logging)? At least it is clear that you are saving log in information somewhere cause when i uninstall and reinstall it it doesn't ask me about it.
You can run
abp cli clear-cache
command apart from doing uninstall/install operations. -
0
Hello again, I have sent you the email, but i don't think sth would come up from there. Probably it would work fine since it works on my macbook. Here i want to take a different approach. Can you just guide me how can i get the source code of @abp/ng.schematics package into my project and when i run the abp cli, instead of the regular package, i want to run the source code that i downloaded so i can log more about the problem. How can i do that? It would be great if you can give me step by step instructions about getting the source code to my project and running it. So i can modify it.
-
0
I have sent you the email, but i don't think sth would come up from there. Probably it would work fine since it works on my macbook.
Thank you for sharing more details. As you have already mentioned, it should be working fine within this response. It is strange that it does not work on your windows machine, but in mac.
Apart from that, there are several ways to integrate the schematics source code to your project. My shortest recommendation is to clone the abp framework codebase
- You need to operate on schematics package that is under
npm/ng-packs/packages/schematics
directory. - You can go through the package however you wish, but you should focus on https://github.com/abpframework/abp/blob/26fb5dcdcd4ceaf9412aebb7d9fbfb0bd6b9cc10/npm/ng-packs/packages/schematics/src/utils/source.ts#L43
- You can make changes without committing for sure
- In order to see the changes, you need to run
yarn build:schematics
command underng-packs
directory. - Then you need to run
yarn link
undernpm/ng-packs/dist/packages/schematics
- Copy the link command and paste under the directory you will generate the proxy
You can let us know if you need further assistance.
- You need to operate on schematics package that is under
-
0
ok thanks for the reply. Now i have figured it out by changing the source code and get more detailed exception. It was trying to use ipv6 while trying to connect to port 44389 according to error log.
at ClientRequest.<anonymous> (C:\dev\abp\npm\ng-packs\node_modules\got\dist\source\core\index.js:970:111)\n at Object.onceWrapper (node:events:639:26)\n at ClientRequest.emit (node:events:536:35)\n at origin.emit (C:\dev\abp\npm\ng-packs\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20)\n at emitErrorEvent (node:_http_client:104:11)\n at TLSSocket.socketErrorListener (node:_http_client:512:5)\n at TLSSocket.emit (node:events:524:28)\n at emitErrorNT (node:internal/streams/destroy:170:8)\n at emitErrorCloseNT (node:internal/streams/destroy:129:3)\n at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16)","message":"connect ECONNREFUSED ::1:44389","name":"RequestError","code":"ECONNREFUSED","request":{"options":{},"timings":{}},"options":{},"timings":{}}
so i upgraded my nodejs to the latest version. probably sth was broken on my nodejs installation or the version had some bugs.it has been fixed now. Thank you for step by step instruction. I am closing this thread.
-
0
I am glad to hear that your problem has been resolved.