PDA

View Full Version : [CLOSED] Deployment Issue



Z
Mar 12, 2018, 5:51 AM
We completed a major set of changes to our EXT.NET mobile application. It works great on Chrome locally without any issues.

When we deployed to Production, we found that only one image on our login page loaded (it was as Content). All the EXT.NET mobile stuff didnt load at all on real android or iOS devices that loaded the old site just fine.

On my Android device, i saw the same problem. After clearing cache or using incognito, i was able to get it to work. iOS was a disaster and wouldnt load at all.

We ended up to roll back the entire update. Any suggestions or ideas here? I don't even know where to start.

it isnt a specific bug; rather, some EXT.net caching issue.

Let me know what you need to proceed. I am happy to take it offline and show it to you since this isnt something i can "post" to a forum as it is the entire deployment.

thanks,
/Z

fabricio.murta
Mar 12, 2018, 6:13 PM
Hello @Z!

Sorry to hear you've had a bad experience deploying your Ext.NET application. How exactly are you referencing the images for your login page? Just using the theme's icons, or using full url to the resources?

If you are using URLs for images, then using a cache buster may help (i.e. adding a unique ?uniqueKey123 to the end of the URL).

There's also a chance the images you are talking about are feed from a font file (glyphs), and the font for some reason is not being loaded by the phone browsers you are using.

Did you get the same result if you loaded the page on your desktop, using Chrome, with developer tools open and device emulation to either iOS or Android? The 'network' tab might reveal what URLs are not loading and the console, any javascript error that could have raised once published.

I hope this helps!

Z
Mar 12, 2018, 7:03 PM
ONLY the top images shows because it is Content (img.png)....
the EXT stuff is all missing.
we use a custom Fingerprint class that creates a fake sub directory (h-234234343). Then we use a server rewrite to remove the fake directory on the way to the server. The fake directory uses a long (which is timestamp of write) so we never have a caching issue.

My problem is EXT doesn't load!!! All my EXT controls are missing!

see my primary page. I am thinking the issue is the themes we added (that was new)

/Z



<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Mobile.Views.Account.Login" %>


<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>zzz</title>
<link rel="stylesheet" type="text/css" href="<%=Mobile.Fingerprint.Tag("/mobile/resources/css/stuff.css")%>" />


<script type="text/javascript" src="<%=Mobile.Fingerprint.Tag("/mobile/resources/js/mobile.js")%>"></script>
<script type="text/javascript" src="<%=Mobile.Fingerprint.Tag("/mobile/resources/js/util.js")%>"></script>
</head>


<body>


<ext:ResourceManager runat="server" Theme="Neptune" />


<ext:Store ID="AppCache" runat="server" AutoLoad="false">
<Model>
<ext:Model ID="NameValuePair" IDProperty="id" runat="server">
<Fields>
<ext:ModelField Name="name" />
<ext:ModelField Name="value" />
</Fields>
</ext:Model>
</Model>
</ext:Store>


<ext:Viewport ID="Viewport1" runat="server" EnableTheming="true">
<Items>
<ext:TabPanel runat="server" Layout="CardLayout" ID="mobileTabPanel">
<TabBarConfig Hidden="true" />
<Items>
<ext:FormPanel
runat="server"
ID="loginForm"
Scrollable="Both"
StyleHtmlContent="true">
<Items>
<ext:Container
runat="server"
MarginSpec="10 5 10 5">
<Content>
<img src="/mobile/resources/images/img.png" alt="Logo" style="height: auto; width: auto; max-width: 400px; max-height: 120px; display: block; margin-left: auto; margin-right: auto" />
</Content>
</ext:Container>


<ext:Container runat="server"
Hidden="true"
ID="loginError"
MarginSpec="10 5 10 5">
<Content>
<center style='color: #990000; margin: 5px 0px;'></center>
</Content>
</ext:Container>
<ext:TextField
ID="username"
runat="server"
Label="Username"
LabelWidthPercent="40"
Required="true"
Padding="5"
MarginSpec="10 5 10 5"
AutoCapitalize="false"
AutoFocus="true"
PlaceHolder="Username"
AutoFocusDelay="100">
</ext:TextField>
<ext:PasswordField
ID="pin"
runat="server"
Label="Password"
MarginSpec="10 5 10 5"
PlaceHolder="PIN"
LabelWidthPercent="40"
Padding="5"
Required="true">
</ext:PasswordField>
<ext:Button
runat="server"
ID="loginBtn"
Text="Login"
MarginSpec="10 5 10 5"
MinHeight="38"
Cls="okBtn"
UI="Action">
<Listeners>
<Tap Fn="onLoginBtnTap" />
</Listeners>
</ext:Button>
</Items>
</ext:FormPanel>




<ext:TabPanel runat="server" ActiveTabIndex="0" PaddingSpec="0 8" ID="mainTabView" >
<TabBarConfig Docked="bottom" EnableTheming="true" Scrollable="Horizontal">
<LayoutConfig>
<ext:LayoutConfig>
<CustomConfig>
<ext:ConfigItem Name="pack" Value="center" />
<ext:ConfigItem Name="align" Value="center" />
</CustomConfig>
</ext:LayoutConfig>
</LayoutConfig>
<abcaults>
<ext:Parameter Name="iconAlign" Value="top" />
</abcaults>
</TabBarConfig>
<abcaults>
<ext:Parameter Name="scrollable" Value="true" Mode="Raw" />
</abcaults>
<Items>
<ext:Panel Title="xyz" runat="server" IconCls="x-fa fa-xyz" ID="xyz">
<Items>
<ext:UserControlLoader UserControlID="xyzCtl" runat="server" Path="~/Views/xyz/xyz.ascx" />
</Items>
<Listeners>
<Show handler="onxyzButtonTap(); tabIndex = this.id;" />
</Listeners>
</ext:Panel>
<ext:Panel Title="abc" runat="server" IconCls="x-fa fa-puff" ID="abc" Layout="FitLayout">
<Items>
<ext:UserControlLoader UserControlID="abcCtl" runat="server" Path="~/Views/abc/abc.ascx" />
</Items>
<Listeners>
<Activate Fn="onabcTabInitialized" />
<Show handler="onabcTabActivated(); tabIndex = this.id" />
</Listeners>
</ext:Panel>
<ext:Panel Title="def" runat="server" IconCls="x-fa fa-blah-o" ID="def" Layout="FitLayout">
<Items>
<ext:UserControlLoader UserControlID="defCtl" runat="server" Path="~/Views/def/def.ascx" />
</Items>
<Listeners>
<Activate handler="ondefTabActivated(); tabIndex = this.id" />
</Listeners>
</ext:Panel>
<ext:Panel Title="ghi" runat="server" IconCls="x-fa fa-plus" ID="ghi" Layout="FitLayout">
<Items>
<ext:UserControlLoader UserControlID="ghiCtl" runat="server" Path="~/Views/ghi/ghi.ascx" />
</Items>
<Listeners>
<Activate handler="onghiTabActivated(); tabIndex = this.id" />
</Listeners>
</ext:Panel>
<ext:Panel Title="Fill Shift" Layout="CardLayout" runat="server" IconCls="x-fa fa-search" ID="jkl">
<Items>
<ext:UserControlLoader UserControlID="jklCtl" UIName="dark" runat="server" Path="~/Views/jkl/jkl.ascx" />
</Items>
<Listeners>
<Activate Fn="onjklTabInitialized" />
<Show handler="onjklTabActivated(); tabIndex = this.id" />
</Listeners>
</ext:Panel>
<ext:Panel Title="mno" runat="server" IconCls="x-fa fa-plane" ID="mno" Centered="true" Layout="FitLayout">
<Items>
<ext:UserControlLoader UserControlID="mnoCtl" runat="server" Path="~/Views/mno/mno.ascx" />
</Items>
<Listeners>
<Show handler="onmnoTabActivated(); tabIndex = this.id" />
</Listeners>
</ext:Panel>
<ext:Panel Title="pqr" runat="server" IconCls="x-fa fa-info-circle" ID="pqr" Layout="FitLayout" ActiveIndex="6">
<Items>
<ext:UserControlLoader UserControlID="pqrCtl" runat="server" Path="~/Views/pqr/pqr.ascx" />
</Items>
<Listeners>
<Show handler="tabIndex = this.id" />
</Listeners>
</ext:Panel>
<ext:Panel Title="Logout" runat="server" IconCls="x-fa fa-sign-out" Cls="logOutPanel" ID="Logout" Layout="FitLayout">
<Items>
<ext:UserControlLoader UserControlID="logoutCtl" runat="server" Path="~/Views/Logout/Logout.ascx" />
</Items>
</ext:Panel>
</Items>
</ext:TabPanel>


</Items>
</ext:TabPanel>
</Items>
</ext:Viewport>
</body>
</html>

fabricio.murta
Mar 12, 2018, 10:52 PM
Hello @Z!

So, please check from your browser when you load a page and compare with code behind, it is probably rewriting Ext.NET resources' path thus making the page not open.

You are probably getting several 404 or 500 errors if you open developer tools' network tab as the URLs to Ext.NET resources (which are routed from Asp.NET within Ext.NET DLL) due to the page URLs' mangling from IIS. Ext.NET route is set up at App_Start\ExtNetMobileConfig.cs, if that helps.

fabricio.murta
Mar 12, 2018, 11:04 PM
it isnt a specific bug; rather, some EXT.net caching issue.

That's quite strange, Ext.NET does not do any caching. It builds pages from the request IIS (or IISExpress, locally) makes.

If you are getting issues due to the browser caching the page when it shouldn't, then you need to implement cache busting (https://www.keycdn.com/support/what-is-cache-busting/) in your website. Cache busting is especially important if you also maintain your own set of CSS styling thru included files.

Ext.NET's "init script" (a script containing the instructions to load the .aspx page you're loading) is provided always with a unique random address (it implements its own cache buster for the unique script, even through different loads of the same page, same build); a proof that it is working is that you actually get different results as you update your production website).

Ext.NET main resource files also include cache busting, enforced every version update.

I hope this helps!

Z
Mar 13, 2018, 7:12 PM
It all works fine locally. Only a problem when we deploy it to prod.
We have a cache buster already.
/Z

fabricio.murta
Mar 14, 2018, 11:18 PM
Hello @Z!

Unfortunately I have little clue of what the problem could be.

Maybe, is it possible for you to deploy to a temp space we could open from our side and see if we spot something wrong the server may be doing to the Ext.NET resources set up on page load?

I believe taking your whole website offline for the sake of this demonstration is not worth as it may take hours between we reply here, you set it up on your side, and we check back to verify. So if you could post this to a temporary space -maybe- we could spot something.

The only thing I can think of at the moment, is that the rewrite module on your website could be corrupting addresses to Ext.NET resources -- although it shouldn't be working with current Ext.NET if that was the case.

Z
Mar 15, 2018, 2:21 AM
I was hoping we can do a 15 minute skype session and i can show you old. then deploy for you. and you can see the new and the problem.
I am quite knowledgeable on EXT am this one has me stumped.
/Z

geoffrey.mcgill
Mar 15, 2018, 3:01 AM
In the browser tools, check the Network tab. Are requests failing? If yes, what is the response? Is the correct (or expected) url being requested?

Z
Mar 15, 2018, 3:24 AM
Geoffrey,

I am raising this up as it is a maddingly odd issue.

On Chrome locally, there are NO issues! Everything is perfect. All items return status code 200 with no errors at all.

it ONLY fails in production and the web.config is perfect and correct. We have been live with an working EXT.NET mobile site for 6 months now. Only this update is failing but works perfectly in Chrome locally.

if i continually clear my cache, Andriod will eventually load. iOS never works.

/Z

Z
Mar 15, 2018, 3:55 AM
I might have made a breakthrough....

One change we made was we set a Theme.

i used ngrok to hit my app from an Android Emulator (accelerated) and then used ngrok (like fiddler).

Basically, there is a new file at the bottom. Notice the neptune themed ext-mobile.axd.

Where is that file? it is under /mobile/extjs and not /mobile/extnet

Is this in the Ext.Net.Mobile.dll??

/Z

Z
Mar 15, 2018, 4:00 AM
and with the triton theme....

Z
Mar 15, 2018, 4:07 AM
i am gonna guess the theming caused an issue and somehow my DLL cant find or doesnt have that theme and hence the inability to load....
/Z

geoffrey.mcgill
Mar 15, 2018, 5:04 AM
Can you list the Network requests that are failing? and provide the response details.

What version of Ext.NET Mobile were you previously using? and what version is your app currently using?

geoffrey.mcgill
Mar 15, 2018, 5:11 AM
We'll run some tests with the Ext.NET Mobile Themes and see if we can reproduce the issue.

Z
Mar 15, 2018, 6:00 AM
Interesting that i am using version 4.1.1 in production and the website lists version 4.1.0 as the latest.
I forget what you fixed when you gave me 4.1.1. Maybe that 4.1.1 build was no good.
/Z

Z
Mar 15, 2018, 1:34 PM
I would need to deploy to PROD to run these tests and and not ready to do that until we have some idea of why it fails (or you are available to review online with me).
/Z

Z
Mar 15, 2018, 1:41 PM
So apparently, we rebuilt out Ext.NET mobile DLL to work around this bug.

https://forums.ext.net/showthread.php?62143-FIXED-1564-4-2-0-Mobile-Doesnt-load-in-Oreo-and-or-pixel

Maybe that is the cause of this all, that our build was invalid. We did need to set a specific value (read thru posting) to get it to work. Maybe that is the cause of it.

it all works locally...

thanks,
/Z

Z
Mar 15, 2018, 1:51 PM
I think rebuilding my own version is the likely culprit. Even though i rebuilt, the version seems to be stuck at 4.1.0. i am also using nuget and VSTS to build now so likely i have a corrupted references to 4.1.0 (even though i am flagged as 4.1.1 locally) and when i deploy, it is just a crapshoot if it works and that is why the clients cant utilize any ext.net functionality.
Any chance, you can release 4.1.1 officially and fix the user agent string problem? That should solve this mess.
/Z

geoffrey.mcgill
Mar 15, 2018, 6:27 PM
Hi. We will look into releasing Ext.NET Mobile 4.1.1 today. I'll keep you updated with our progress.

geoffrey.mcgill
Mar 15, 2018, 10:06 PM
Hi. Can you install from NuGet? The 4.1.1 build was published to NuGet a while back.

https://www.nuget.org/packages/ext.net.mobile

We're working on packaging up the .zip to provide on the ext.net/download (https://ext.net/download) page.

Z
Mar 16, 2018, 4:29 PM
great. i will package it up and deploy it Sat night.
i will keep you updated.
thanks,
/Z

Z
Mar 16, 2018, 5:23 PM
Geoffrey,

I appreciate all your efforts. I will be attempting a new deployment this weekend.

However, i still find some inconsistencies in the new 4.1.1 that are very disconcerting.

To test, i created a brand new VS ASP.NET. then from the solution, i did manage nuget and downloaded the packages.

Issues:
The "welcome message" says it is version 4.1
The property of the Ext.net mobile DLL says it is version 4.1.0
Git tells me it is 4.1.1 that was downloaded.

All of this terribly confusing when we are having such a problem with deployment.
This stuff MUST be consistent for all deployments and should be corrected.

see attachment.
thanks,
/Z

Z
Mar 18, 2018, 9:38 AM
I finally was able to get the debug details from the phone itself. it appears the phone makes the call. the backend then tosses an exception/
/Z

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/18/2018 4:35:14 AM
Event time (UTC): 3/18/2018 8:35:14 AM
Event ID: b67b2f61b5bd4cfaaadce1cfd3bc33b8
Event sequence: 76
Event occurrence: 2
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT/mobile-12-131658343668517450
Trust level: Full
Application Virtual Path: /mobile
Application Path: C:\zzz\mobile\
Machine name: zzzz

Process information:
Process ID: 7008
Process name: w3wp.exe
Account name: blah

Exception information:
Exception type: InitializationScriptNotFoundException
Exception message: The Ext.NET Mobile initialization script was not found.
at Ext.Net.Mobile.ResourceHandler.ProcessRequest(Http Context context)
at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStepImpl(IExecut ionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)




Request information:
Request URL: https://zzzzzz:443/mobile/extnet/extnet-init-js/ext-mobile.axd?44c98e93ae2f4722b957216cac6f3324
Request path: /mobile/extnet/extnet-init-js/ext-mobile.axd
User host address: zzz
User:
Is authenticated: False
Authentication Type:
Thread account name: blah

Thread information:
Thread ID: 52
Thread account name: blah
Is impersonating: False
Stack trace: at Ext.Net.Mobile.ResourceHandler.ProcessRequest(Http Context context)
at System.Web.HttpApplication.CallHandlerExecutionSte p.System.Web.HttpApplication.IExecutionStep.Execut e()
at System.Web.HttpApplication.ExecuteStepImpl(IExecut ionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)


Custom event details:

Z
Mar 18, 2018, 10:02 AM
Changing from Linked to Inline (web.config) fixes that....

Z
Mar 18, 2018, 10:04 AM
And then the real problem. this does not work. i thought Fn was a valid usage. but it causes the app not to load. i changed it to Hander="getZZZList_selected()" and it works.

note that if i leave out the () and did Handler="getZZZList_selected", it fails. Also, iOS is more tempermental than android so test on iOS. I used a real phone and just kept removing code till it loaded. then it put it back piece by piece till it failed. Note that on android it fails to. Plug in a USB cable and run it via Chrome remote debugging and it works!!!

so you must have the debugger off for it to fail. crazy!

Please review...

/Z



<ext:Panel runat="server" Scrollable="Both" Layout="FitLayout" ID="zzz" PaddingSpec="0 10 0 0" Hidden="true">
<Items>
<ext:List runat="server" ID="zzzsd3" EmptyText="No Record Found" Scrollable="Both" AllowDeselect="false" Mode="Multi" MarginSpec="1 0 10 0">
<Listeners>
<Select Fn="getZZZList_selected" />
<Deselect Fn="getZZZList_deselected" />
</Listeners>
</ext:List>
</Items>
</ext:Panel>

geoffrey.mcgill
Mar 19, 2018, 5:00 AM
The following two lines should both call the function:



<Select Fn="getZZZList_selected" />
<Select Handler="getZZZList_selected()" />


The Fn property can be set with a function name. The Handler property can be set with any JavaScript that will be executed on the client.

Z
Mar 19, 2018, 8:09 PM
I will try to build a small test.
it works on a main page but not on a control.
/Z

Z
Mar 20, 2018, 4:26 AM
built the test app best i could but cannot replicate it. something we did is causing it but i don't have an answer now :(
it works though with Handler. probably just JS technicality is causing it based on something in our code.
/Z