FoxInCloud
Starting Web Application 'FoxInCloud App'... - errors encountered
Gravatar is a globally recognized avatar based on your email address. Starting Web Application 'FoxInCloud App'... - errors encountered
  Paul
  All
  Dec 5, 2018 @ 09:32pm

Hi,

When I run xxxtest inside Web App Studio, Web Connection starts up and I see two wait window messages :

  1. something about WITH/ENDWITH mismatch
  2. something about OSERVERFORM.setserverproperties

They disappear when clicked and in the WC log, via the Status button, I see :
Error: 1925 Message: Unknown member OSERVERFORM. Code: ... Program: setserverproperties Line No: 856

I'm guessing something is wrong in the xxxsets code, or somewhere else, resulting in the xxxserver object not being instantiated.
How do I find what the problem is? Where do I find a log of exactly what errors were encountered?

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: Starting Web Application 'FoxInCloud App'... - errors encountered
  Gilles Lajot-Sarthou
  Paul
  Dec 5, 2018 @ 11:22pm

Hi Paul 1 - Foxpro should not be installed in the "C: \ Program Files (x86)" folder but in a folder not subject to Windows "roaming" 2 - You must always use the FoxInCloud Studio shortcut (C: \ VFP9 \ vfp9.exe -c ".. \ AW \ aw.fpw" -t) to manipulate and modify a suitable project. Doing it directly from the Foxpro IDE generates all these malfunctions

3 - When using the messagebox () command that is handled by VFP as a form, with a return value processing, the processing code that follows the messagebox () call must be moved in a wFormCallBack method. This can only be done by manual modification of the source code (copy / paste). These wFormCallBack methods were added to each VFP object by FoxInCloud when adapting VCX classes. Example of use :

* VFP standard code using messagebox into a form
LOCAL iRet AS INTEGER

iRet= MESSAGEBOX('VFP Messagebox callback..', 4+32+256, 'Example', 10000) = 6

DO CASE
	CASE m.iRet = 6
		WAIT 'MessageBox return 6-YES' WINDOWS NOWAIT

	CASE m.iRet = 7
		WAIT 'MessageBox return 7-NO' WINDOWS NOWAIT

	OTHERWISE
		WAIT 'MessageBox return other value ???' WINDOWS NOWAIT
ENDCASE

* FoxInCloud code using wMessageBox into a form method or in object method of a form
=THISFORM.wMessageBox('THISFORM.wFormCallBack', 'FoxInCloud Messagebox callback..', 4+32+256, 'Example', 10000)
* All the next code is moving into the form method wFormCallBack
*!* * Replace VFP code
*!*	LOCAL iRet as Integer
*!*	iRet= MESSAGEBOX('VFP Messagebox callback..', 4+32+256, 'Example', 10000) = 6

* In the method wformcallback append by FoxInCloud adaptation (F.A.A)
PROCEDURE FORM.wFormCallBack
	LPARAMETERS tuUserChoice && automatic code append by FoxInCloud Adaptation

	IF VARTYPE(m.tuUserChoice) == 'N'
		DO CASE
			CASE m.tuUserChoice = 6
				wWAIT ('MessageBox return 6-YES', 'WINDOWS NOWAIT')

			CASE m.tuUserChoice = 7
				wWAIT ('MessageBox return 7-NO', 'WINDOWS NOWAIT')

			OTHERWISE
				wWAIT ('MessageBox return other value ???', 'WINDOWS NOWAIT')
		ENDCASE
	ENDIF
ENDPROC

regards Gilles

Gravatar is a globally recognized avatar based on your email address. re: Starting Web Application 'FoxInCloud App'... - errors encountered
  FoxInCloud Support - Thierry N.
  Paul
  Dec 6, 2018 @ 02:31am

Paul,

  1. all server startup errors are logged in wwRequestLog.dbf
  2. Missing additive in set procedure and set classlib are the most frequent errors in xxxSets
  3. whenever you seek a workable help on some specific code, please post it
Gravatar is a globally recognized avatar based on your email address. re: Starting Web Application 'FoxInCloud App'... - errors encountered
  FoxInCloud Support - Thierry N.
  Gilles Lajot-Sarthou
  Dec 6, 2018 @ 02:35am

Gilles,

1 - Foxpro should not be installed in the "C: \ Program Files (x86)" folder but in a folder not subject to Windows "roaming"

To overcome this 'roaming' issue regardless of where FoxInCloud is installed, the Installshield Pro FoxInCloud installation package grants full rights to all users on the home(1) + 'tools\ab\' folder and its contents.

Paul, could you confirm this right allocation works fine in your case?

Gravatar is a globally recognized avatar based on your email address. re: Starting Web Application 'FoxInCloud App'... - errors encountered
  Paul
  FoxInCloud Support - Thierry N.
  Dec 6, 2018 @ 04:10pm

Permissions are fine.
While debugging, I can see that xxxsets runs successfully from awserverstart() and the path and classlib are correct when xxxsets exits.

The errors occur after xxxsets has returned to the calling method.

The call stack above is just prior to the errors.
The first error occurs in awapphost.init_app and each method in the stack after that has errors, certainly arising from the first error.

wwrequestlog.dbf contains this :
-> first error

     Error:          9
   Message: Data type mismatch.
      Code: ...
   Program: serverformupdate
   Line No:       1369
Handled by: Sfictestserver.Error()<br>

-> then lots of these errors with incrementing line numbers

     Error:       1940
   Message: Expression is not valid outside of WITH/ENDWITH.
      Code: ...
   Program: serverformupdate
   Line No:       1374

-> finally, several of these, with incrementing line numbers

     Error:       1925
   Message: Unknown member OSERVERFORM.
      Code: ...
   Program: setserverproperties
   Line No:        850

This is inside the aw code, so I don't have the source for this.
I will send you the wwrequestlog table separately, if it helps.

At that point the server hangs with "processing request"; note that this is before any web request is made from a browser.

So, I am stuck at the moment 😦
Hopefully the errors above will help you identify what is going wrong.

Thanks
Paul

Gravatar is a globally recognized avatar based on your email address. re: Starting Web Application 'FoxInCloud App'... - errors encountered
  FoxInCloud Support - Thierry N.
  Paul
  Dec 7, 2018 @ 03:00am

Hi Paul,

When posting line numbers in aw code, please make sure to indicate the version you use as line numbers keep changing.

Also, and again, please keep in mind that FoxInCloud works for hundreds of users around the world, so when an issue occurs, in 99% cases, it relates to your code. Not saying your code is wrong, just saying WE ALWAYS NEED YOUR CODE TO FIND THE ISSUE; so please always post your related code. Thanks in advance.

The issue here is that server's reference to control form m.goWCserver.oServerForm is lost after xxxSets.Init() has executed.

So please post your xxxSets.Init() code.

Knowing the value of m.goWCserver.oServerForm after xxxSets.Init() would also help. You can also get it in awAppHost.oServerForm

Gravatar is a globally recognized avatar based on your email address. re: Starting Web Application 'FoxInCloud App'... - errors encountered
  Paul
  FoxInCloud Support - Thierry N.
  Dec 9, 2018 @ 03:30pm

Hi,

The version is FiC 2.28.0.

I found the problem, with your help regarding the global form goWCserver.oServerForm.
This was null because there was a "clear windows" command in XXXSets!

I had left a few "clear" commands in there, thinking they wouldn't do any harm - now I know FiC and WC create global forms before my code I will have to be more careful.
Is it ok to execute clear dlls, menus, popups, resources and program (I'm guessing not for dlls anyway)?

Thanks for your help, I can make further progress now 😃

Paul

Gravatar is a globally recognized avatar based on your email address. re: Starting Web Application 'FoxInCloud App'... - errors encountered
  FoxInCloud Support - Thierry N.
  Paul
  Dec 10, 2018 @ 12:42am

Hi Paul,

In Web mode, FoxInCloud takes care of CLEAR *

If you plan to share xxxSets between desktop and web versions of your app (recommended, eg. see FICtuto\tutoLAN.prg), you can use in xxxSets methods:

IF this.wlLAN && or wlLAN() && desktop mode
  clear …
ELSE
ENDIF
© 1996-2018