Codemagic static Pages: Skip publishing to my_app.codemagic.app: no static content was generated - codemagic

I am trying to publish the web version of my flutter app to Codemagic static Pages. I added a subdomain name and enabled the checkbox, but I get this line in the publishing logs:
Skip publishing to my_app.codemagic.app: no static content was generated
If I try to access the webpage https://my_app.codemagic.app I get:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Details>No such object: codemagic-app/my_app/index.html</Details>
</Error>

check if the "Building Web" step generated files and was finished without any warnings.
if "Building Web" step was skipped probably you don't have web folder in your repository

Related

What are valid page names in Next.js? And how does it distinguish between pages and static resources?

I'm new to Next.js and am trying to get my head around client side and server side routing and what files need to be made available to download when Next.js is configured to use server-side rendering.
When I do a production build of a Next.js project, a .next directory is created (details here). When I call next start and then load a page that uses SSR (by defining getServerSideProps()) then I can see in the developer console that the page that I load downloads resources that are prefixed _next (e.g. <script src="/_next/static/chunks/main-3123a443c688934f.js" defer=""></script>).
Can someone confirm whether the .next directory contents (.next/server/**, .next/static/**) are just made available on the server by being renamed to _next?
I tried creating a new page in a file called _next.js as an experiment. The project builds correctly (no errors reported and there are build artifacts created with the same naming convention as the other pages). However, when I try to load that page, I get a 404.
Are there restrictions on what constitutes a validly named page in Next.js? If so, what are they and where is this defined.
How does the Next.js server know what is a static resource that should just be given to the client and what is a page for which Next.js should render an output? Is it simply an algorithm like "if the path starts _next/ then return what is requested, otherwise render?"
How does Next.js know to distinguish between resources that are in the public directory and pages? e.g. if there's a collision between the name of a page and a resource in the public folder, how does the server know what to return to the user?

How to Make My Data File (JSon) Available in ASP.NET Project

How can I add a static data file to my web project? It doesn't work in debug mode with IIS Express, and I don't have a web site to deploy to yet.
Details
I have a data file that I want to expose on my web site. I have added that file to my ASP.NET project. When I run the project and attempt to view the file, I get a 404. In other words, I debug the project and type the file url into the browser. That url looks like 'https://localhost:44378/Data/widgetConfigMap.json'.
Rationale:
I need the data file to feed a javascript method. That method has an input parameter for a url with data, i.e. my file. The API in question is Bing Maps. The method name is 'createFromConfig'.
Unsatisfactory Alternative
I can generate the file 'on-the-fly' (via a method in my controller), but that method is slow. Slow enough that it timed-out once.
What I have tried
I tried updating the file properties. Initially, the file Build Action was 'Content', I changed that to 'Page', then to 'Resource' → neither worked. The other property choices look wrong.
Summary
I feel like there should be some way to configure my project, or IIS Express to serve-up the data file, but I can't find it.
It sounds like you just add the json file to your project folder instead of importing the json item into your project.
You can access json file directly when you have imported either new json item or existing json file to your /Data folder under your application.
Besides, please ensure you have let your route ignore the URL so static file handler will handle this.
Of course, you can try to publish it to local IIS not IIS express. Then import the data file and it shouldn't be limited.

TeamCity Build Reports HTML pages not loading CSS/JS

I'm following this link to show cucumber HTML reports in a Build Report Tab.
https://confluence.jetbrains.com/display/TCD18/Including+Third-Party+Reports+in+the+Build+Results
In my BuildConfiguration I refer my artifacts as
api/target/cucumber-html-reports/cucumber-html-reports/** => report.zip
In project, report tab "Start Page" is like this
report.zip!/overview-steps.html
The tab is generated and I see the HTML page. BUT it doesn't load CSS/JS nor does it let me navigate to hyperlinks to other pages.
I get the following error when I click any link
403 Forbidden: Requests from build artifacts pages are restricted: Only requests to the same build's artifacts are allowed from the build artifacts.
The issue was that TeamCity auto generates "Build configuration ID" in CamelCase naming convention. When the Report Tab was trying to access the artifact using this camel case URL it didn't found anything.
I changed my project & build configurations IDs to all lower case and it worked smoothly. I hope this helps somebody.

How to deploy XML file with my web application?

I've written an ASP.net web application. In the interest of following the advice in "The Pragmatic Programmer" to put application logic in configuration, I wrote a large XML file that describes various business rules.
When I test the application on my local development workstation, I copy the file to c:\xxxxx\myfile.xml and then write the code to read the file from this location.
What is the correct way to deploy this xml file as part of my web application so that it gets read from the directory in which the web application is deployed?
Update: The XML file in question is for server-side configuration and should never be available for download to the end-user.
If you're not embedding this as a resource, you should:
Create a directory under which this file will reside.
Create the file and set its Build Action to Content.
Create a web.config file in that directory which forbids access to the directory so you don't expose your business rules to the Internet.
Add a setting in your application's main web.config that gives the path to this file relative to the root of the application, i.e. "~/MySecureFolder/MyBusinessRules.Xml".
Have some code that calls HttpServerUtility.MapPath Method to convert the value from the setting in web.config to a virtual path.
I don't know if this is what you want - Click on the XML file, then open the Property Window and find the "Build Action" property. Set the value to "Embedded Resources"
I think what you need to do is:
Add the XML file to your web application project in Visual Studio
Right click on the file and select 'Properties...'
Set the Build Action to 'Content' and Copy to Output Directory to 'Do not copy'
this will ensure that your XML file is deployed along with the rest of your web app.
If you want to make available your XML file from http requests to your server, you should
place it in your web publication folder.
This ASP instruction should help you to find your publication path:
Request.ServerVariables("APPL_PHYSICAL_PATH")

Setting up Content Delivery Webserver Root Locations for Tridion

Problem Description:
Publishing JSP pages work with the following for broker.config.
<Publications DefaultRootLocation="/apps/tridion/wwwroot"
DefaultRootDataLocation="/apps/tridion/wwwroot/data">
Publication pages and directories (based on structure groups) will publish under the wwwroot directory.
I changed the root location for for pages to the following (no longer using "/apps/tridion/wwwroot").
<Publications
DefaultRootLocation="/apps/ekibemobile/jboss-eap-5.1.0/jboss-eap-5.1/jboss-as/server/default/deploy/MobileTermsConditions.war/basic"
DefaultRootDataLocation="/apps/ekibemobile/jboss-eap-5.1.0/jboss-eap-5.1/jboss-as/server/default/deploy/MobileTermsConditions.war/basic/data"
>
Publishing now returns:
A processing error occurred processing a transport package Could not deploy page
[Page id=tcm:493-637128-64 Title=010. Privacy Policy],
IO error creating new page, No such file or directory, No such file or
directory, IO error creating new page, No such file or directory, No
such file or directory
I confirmed the required permission on the above folder on the Linux webserver. I also tried the following in the node of broker.config
<Publication Id="493"
DocumentRoot="/apps/ekibemobile/jboss-eap-5.1.0/jboss-eap-5.1/jboss-as/server/default/deploy/MobileTermsConditions.war/basic"
DataRoot="/apps/ekibemobile/jboss-eap-5.1.0/jboss-eap-5.1/jboss-as/server/default/deploy/MobileTermsConditions.war"
/>
I get the same error with this config. Please suggest what I'm missing!
Some suggestions:
Double check that the directories you've specified do exist.
Ensure that the user running the deployer process has access to write to the directory
Edit both the deployer and broker configs to enable debug logging. Restart everything and repeat your test, then check the logs.
Note that the locations you have specified are configured in the broker configuration, but the deployer process is the relevant one because it will instantiate a broker.
Your best bet would be to make the changes on the deployer.config (cd_deployer_config.xml) on the Tridion Presentation Server.

Categories

Resources